Skip to content

Commit

Permalink
bpo-38840: Incorrect __all__ in multiprocessing.managers (GH-18034)
Browse files Browse the repository at this point in the history
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 d097876)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
  • Loading branch information
miss-islington and ZackerySpytz committed Aug 9, 2021
1 parent c79aa42 commit 8ece98a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Lib/multiprocessing/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
# Licensed to PSF under a Contributor Agreement.
#

__all__ = [ 'BaseManager', 'SyncManager', 'BaseProxy', 'Token',
'SharedMemoryManager' ]
__all__ = [ 'BaseManager', 'SyncManager', 'BaseProxy', 'Token' ]

#
# Imports
Expand All @@ -35,9 +34,11 @@
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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix ``test___all__`` on platforms lacking a shared memory implementation.

0 comments on commit 8ece98a

Please sign in to comment.