From d0978761118856e8ca8ea7b162a6585b8da83df9 Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Mon, 9 Aug 2021 09:44:55 -0700 Subject: bpo-38840: Incorrect __all__ in multiprocessing.managers (GH-18034) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was causing test___all__ to fail on platforms lacking a shared memory implementation. Co-Authored-By: Xavier de Gaye Co-authored-by: Ɓukasz Langa --- Lib/multiprocessing/managers.py | 7 ++++--- Misc/NEWS.d/next/Library/2020-01-16-23-41-16.bpo-38840.VzzYZz.rst | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2020-01-16-23-41-16.bpo-38840.VzzYZz.rst diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py index 9c7e92f..cf637c6 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 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 index 0000000..727f62b --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-01-16-23-41-16.bpo-38840.VzzYZz.rst @@ -0,0 +1 @@ +Fix ``test___all__`` on platforms lacking a shared memory implementation. -- cgit v0.12