Pierre Glaser <[email protected]> added the comment:
> Dropping this into Lib/multiprocessing/spawn.py should cause a repro:
if WINSERVICE:
_python_exe = os.path.join(sys.exec_prefix, 'python.exe')
else:
_python_exe = getattr(sys, '_base_executable', sys.executable)
In this case, spawn.get_executable() will return (sys._base_executable), and
`env` will be set to None anyways no? (see these lines:
https://github.com/python/cpython/blob/9008be303a89bfab8c3314c6a42330b5523adc8b/Lib/multiprocessing/popen_spawn_win32.py#L59-L68)
We need to trigger the if clause of these lines instead, which happens by
default in a virtual env -- this is why it is so troubling: even though a very
simple case (launching a new process from within a virtualenv) should trigger a
bug, it does not.
> And maybe submit a PR with the fix?
Will do.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue38092>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com