Author pierreglaser
Recipients paul.moore, pierreglaser, pitrou, steve.dower, tim.golden, zach.ware
Date 2019-09-10.15:52:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568130735.67.0.34123651115.issue38092@roundup.psfhosted.org>
In-reply-to
Content
> 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.
History
Date User Action Args
2019-09-10 15:52:15pierreglasersetrecipients: + pierreglaser, paul.moore, pitrou, tim.golden, zach.ware, steve.dower
2019-09-10 15:52:15pierreglasersetmessageid: <1568130735.67.0.34123651115.issue38092@roundup.psfhosted.org>
2019-09-10 15:52:15pierreglaserlinkissue38092 messages
2019-09-10 15:52:15pierreglasercreate