Skip to content

Commit 40b353b

Browse files
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 <[email protected]> Co-authored-by: Łukasz Langa <[email protected]> (cherry picked from commit d097876) Co-authored-by: Zackery Spytz <[email protected]>
1 parent 26539ce commit 40b353b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Lib/multiprocessing/managers.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
# Licensed to PSF under a Contributor Agreement.
99
#
1010

11-
__all__ = [ 'BaseManager', 'SyncManager', 'BaseProxy', 'Token',
12-
'SharedMemoryManager' ]
11+
__all__ = [ 'BaseManager', 'SyncManager', 'BaseProxy', 'Token' ]
1312

1413
#
1514
# Imports
@@ -35,9 +34,11 @@
3534
from . import get_context
3635
try:
3736
from . import shared_memory
38-
HAS_SHMEM = True
3937
except ImportError:
4038
HAS_SHMEM = False
39+
else:
40+
HAS_SHMEM = True
41+
__all__.append('SharedMemoryManager')
4142

4243
#
4344
# Register some things for pickling
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix ``test___all__`` on platforms lacking a shared memory implementation.

0 commit comments

Comments
 (0)