Skip to content

Commit

Permalink
Merge pull request #248 from bluetech/rm-jython-workaround
Browse files Browse the repository at this point in the history
Remove a workaround for Jython
  • Loading branch information
RonnyPfannschmidt authored Feb 24, 2024
2 parents 1900890 + 9af6b93 commit d68c591
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/execnet/gateway_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,6 @@ def sendexec(io, *sources):
io.write((repr(source) + "\n").encode("utf-8"))


def fix_pid_for_jython_popen(gw):
"""
fix for jython 2.5.1
"""
spec, io = gw.spec, gw._io
if spec.popen and not spec.via:
# XXX: handle the case of remote being jython
# and not having the popen pid
if io.popen.pid is None:
io.popen.pid = gw.remote_exec(
"import os; channel.send(os.getpid())"
).receive()


def bootstrap(io, spec):
if spec.popen:
if spec.via or spec.python:
Expand All @@ -105,5 +91,4 @@ def bootstrap(io, spec):
else:
raise ValueError("unknown gateway type, can't bootstrap")
gw = Gateway(io, spec)
fix_pid_for_jython_popen(gw)
return gw

0 comments on commit d68c591

Please sign in to comment.