]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-38840: Incorrect __all__ in multiprocessing.managers (GH-18034) (GH-27684)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 9 Aug 2021 17:31:10 +0000 (10:31 -0700)
committerGitHub <noreply@github.com>
Mon, 9 Aug 2021 17:31:10 +0000 (19:31 +0200)
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>
Lib/multiprocessing/managers.py
Misc/NEWS.d/next/Library/2020-01-16-23-41-16.bpo-38840.VzzYZz.rst [new file with mode: 0644]

index f8d3cef110fa58d51688a3521cab642d17012fd1..dfa566c6fc386f7e46b682a7c3a603b1afc2c839 100644 (file)
@@ -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
diff --git a/Misc/NEWS.d/next/Library/2020-01-16-23-41-16.bpo-38840.VzzYZz.rst b/Misc/NEWS.d/next/Library/2020-01-16-23-41-16.bpo-38840.VzzYZz.rst
new file mode 100644 (file)
index 0000000..727f62b
--- /dev/null
@@ -0,0 +1 @@
+Fix ``test___all__`` on platforms lacking a shared memory implementation.