summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-08-09 17:31:10 (GMT)
committerGitHub <noreply@github.com>2021-08-09 17:31:10 (GMT)
commit40b353bc079b990cf0d6259a5720fb9729c1b81e (patch)
tree84e8894850e03a157b84e6f72d20d65e6b34bc0e /Lib
parent26539cea8ad3256f5385268a1a70847f64b1865d (diff)
downloadcpython-40b353bc079b990cf0d6259a5720fb9729c1b81e.zip
cpython-40b353bc079b990cf0d6259a5720fb9729c1b81e.tar.gz
cpython-40b353bc079b990cf0d6259a5720fb9729c1b81e.tar.bz2
bpo-38840: Incorrect __all__ in multiprocessing.managers (GH-18034) (GH-27684)
This was causing test___all__ to fail on platforms lacking a shared memory implementation. Co-Authored-By: Xavier de Gaye <xdegaye@gmail.com> Co-authored-by: Ɓukasz Langa <lukasz@langa.pl> (cherry picked from commit d0978761118856e8ca8ea7b162a6585b8da83df9) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/multiprocessing/managers.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py
index f8d3cef..dfa566c 100644
--- a/Lib/multiprocessing/managers.py
+++ b/Lib/multiprocessing/managers.py
@@ -8,8 +8,7 @@
# Licensed to PSF under a Contributor Agreement.
#
-__all__ = [ 'BaseManager', 'SyncManager', 'BaseProxy', 'Token',
- 'SharedMemoryManager' ]
+__all__ = [ 'BaseManager', 'SyncManager', 'BaseProxy', 'Token' ]
#
# Imports
@@ -35,9 +34,11 @@ from . import util
from . import get_context
try:
from . import shared_memory
- HAS_SHMEM = True
except ImportError:
HAS_SHMEM = False
+else:
+ HAS_SHMEM = True
+ __all__.append('SharedMemoryManager')
#
# Register some things for pickling