Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
4e02f8f8
Unverified
Kaydet (Commit)
4e02f8f8
authored
Ock 25, 2019
tarafından
Steve Dower
Kaydeden (comit)
GitHub
Ock 25, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-35797: Fix default executable used by the multiprocessing module (GH-11676)
üst
3bab40db
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
spawn.py
Lib/multiprocessing/spawn.py
+8
-1
test_venv.py
Lib/test/test_venv.py
+13
-0
2019-01-25-12-29-14.bpo-35797.MzyOK9.rst
...S.d/next/Windows/2019-01-25-12-29-14.bpo-35797.MzyOK9.rst
+1
-0
No files found.
Lib/multiprocessing/spawn.py
Dosyayı görüntüle @
4e02f8f8
...
@@ -29,12 +29,19 @@ __all__ = ['_main', 'freeze_support', 'set_executable', 'get_executable',
...
@@ -29,12 +29,19 @@ __all__ = ['_main', 'freeze_support', 'set_executable', 'get_executable',
if
sys
.
platform
!=
'win32'
:
if
sys
.
platform
!=
'win32'
:
WINEXE
=
False
WINEXE
=
False
WINSERVICE
=
False
WINSERVICE
=
False
_WINENV
=
False
else
:
else
:
WINEXE
=
(
sys
.
platform
==
'win32'
and
getattr
(
sys
,
'frozen'
,
False
)
)
WINEXE
=
getattr
(
sys
,
'frozen'
,
False
)
WINSERVICE
=
sys
.
executable
.
lower
()
.
endswith
(
"pythonservice.exe"
)
WINSERVICE
=
sys
.
executable
.
lower
()
.
endswith
(
"pythonservice.exe"
)
_WINENV
=
'__PYVENV_LAUNCHER__'
in
os
.
environ
if
WINSERVICE
:
if
WINSERVICE
:
_python_exe
=
os
.
path
.
join
(
sys
.
exec_prefix
,
'python.exe'
)
_python_exe
=
os
.
path
.
join
(
sys
.
exec_prefix
,
'python.exe'
)
elif
_WINENV
:
# bpo-35797: When running in a venv, we need to bypass the redirect
# executor and launch our base Python.
import
_winapi
_python_exe
=
_winapi
.
GetModuleFileName
(
0
)
else
:
else
:
_python_exe
=
sys
.
executable
_python_exe
=
sys
.
executable
...
...
Lib/test/test_venv.py
Dosyayı görüntüle @
4e02f8f8
...
@@ -306,6 +306,19 @@ class BasicTest(BaseTest):
...
@@ -306,6 +306,19 @@ class BasicTest(BaseTest):
)
)
self
.
assertEqual
(
out
.
strip
(),
'0'
)
self
.
assertEqual
(
out
.
strip
(),
'0'
)
def
test_multiprocessing
(
self
):
"""
Test that the multiprocessing is able to spawn.
"""
rmtree
(
self
.
env_dir
)
self
.
run_with_capture
(
venv
.
create
,
self
.
env_dir
)
envpy
=
os
.
path
.
join
(
os
.
path
.
realpath
(
self
.
env_dir
),
self
.
bindir
,
self
.
exe
)
out
,
err
=
check_output
([
envpy
,
'-c'
,
'from multiprocessing import Pool; '
+
'print(Pool(1).apply_async("Python".lower).get(3))'
])
self
.
assertEqual
(
out
.
strip
(),
"python"
.
encode
())
@skipInVenv
@skipInVenv
class
EnsurePipTest
(
BaseTest
):
class
EnsurePipTest
(
BaseTest
):
"""Test venv module installation of pip."""
"""Test venv module installation of pip."""
...
...
Misc/NEWS.d/next/Windows/2019-01-25-12-29-14.bpo-35797.MzyOK9.rst
0 → 100644
Dosyayı görüntüle @
4e02f8f8
Fix default executable used by the multiprocessing module
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment