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
c40278ef
Kaydet (Commit)
c40278ef
authored
Tem 11, 2018
tarafından
Derek B. Kim
Kaydeden (comit)
INADA Naoki
Tem 11, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Simplify __all__ in multiprocessing (GH-6856)
üst
5e5bbbec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
7 deletions
+10
-7
__init__.py
Lib/multiprocessing/__init__.py
+2
-3
context.py
Lib/multiprocessing/context.py
+2
-4
_test_multiprocessing.py
Lib/test/_test_multiprocessing.py
+6
-0
No files found.
Lib/multiprocessing/__init__.py
Dosyayı görüntüle @
c40278ef
...
...
@@ -19,9 +19,8 @@ from . import context
# Copy stuff from default context
#
globals
()
.
update
((
name
,
getattr
(
context
.
_default_context
,
name
))
for
name
in
context
.
_default_context
.
__all__
)
__all__
=
context
.
_default_context
.
__all__
__all__
=
[
x
for
x
in
dir
(
context
.
_default_context
)
if
not
x
.
startswith
(
'_'
)]
globals
()
.
update
((
name
,
getattr
(
context
.
_default_context
,
name
))
for
name
in
__all__
)
#
# XXX These should not really be documented or public.
...
...
Lib/multiprocessing/context.py
Dosyayı görüntüle @
c40278ef
...
...
@@ -5,7 +5,7 @@ import threading
from
.
import
process
from
.
import
reduction
__all__
=
[]
# things are copied from here to __init__.py
__all__
=
()
#
# Exceptions
...
...
@@ -24,7 +24,7 @@ class AuthenticationError(ProcessError):
pass
#
# Base type for contexts
# Base type for contexts
. Bound methods of an instance of this type are included in __all__ of __init__.py
#
class
BaseContext
(
object
):
...
...
@@ -261,8 +261,6 @@ class DefaultContext(BaseContext):
else
:
return
[
'fork'
,
'spawn'
]
DefaultContext
.
__all__
=
[
x
for
x
in
dir
(
DefaultContext
)
if
x
[
0
]
!=
'_'
]
#
# Context types for fixed start method
#
...
...
Lib/test/_test_multiprocessing.py
Dosyayı görüntüle @
c40278ef
...
...
@@ -4582,6 +4582,12 @@ class TestSimpleQueue(unittest.TestCase):
proc
.
join
()
class
MiscTestCase
(
unittest
.
TestCase
):
def
test__all__
(
self
):
# Just make sure names in blacklist are excluded
support
.
check__all__
(
self
,
multiprocessing
,
extra
=
multiprocessing
.
__all__
,
blacklist
=
[
'SUBDEBUG'
,
'SUBWARNING'
])
#
# Mixins
#
...
...
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