]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-39439: Fix multiprocessing spawn path in a venv on Windows (GH-18158)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 28 Jan 2020 10:52:47 +0000 (02:52 -0800)
committerGitHub <noreply@github.com>
Tue, 28 Jan 2020 10:52:47 +0000 (02:52 -0800)
(cherry picked from commit 0be3246d4f9c8eddcd55491901d95b09fe163f15)

Co-authored-by: Adam Meily <ameily@users.noreply.github.com>
Lib/multiprocessing/spawn.py
Misc/NEWS.d/next/Windows/2020-01-24-03-15-05.bpo-39439.sFxGfR.rst [new file with mode: 0644]

index 075f3455478b52ab84579cdd5d0eab9d3fccf70a..7cc129e2610761f3868523030ea4fa60ec9d844b 100644 (file)
@@ -36,7 +36,7 @@ else:
 if WINSERVICE:
     _python_exe = os.path.join(sys.exec_prefix, 'python.exe')
 else:
-    _python_exe = sys._base_executable
+    _python_exe = sys.executable
 
 def set_executable(exe):
     global _python_exe
diff --git a/Misc/NEWS.d/next/Windows/2020-01-24-03-15-05.bpo-39439.sFxGfR.rst b/Misc/NEWS.d/next/Windows/2020-01-24-03-15-05.bpo-39439.sFxGfR.rst
new file mode 100644 (file)
index 0000000..d677c4c
--- /dev/null
@@ -0,0 +1 @@
+Honor the Python path when a virtualenv is active on Windows.
\ No newline at end of file