diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2023-11-10 23:23:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-10 23:23:27 (GMT) |
commit | ae8116cfa944dccad13638f6875b33b98d285b63 (patch) | |
tree | d7ef2787e60d7ae2102cae181627d2cc60e0075b /Lib/test/test_genericalias.py | |
parent | 06c47a305d8f7f4f56a1113d9eb2eddcc175f2ed (diff) | |
download | cpython-ae8116cfa944dccad13638f6875b33b98d285b63.zip cpython-ae8116cfa944dccad13638f6875b33b98d285b63.tar.gz cpython-ae8116cfa944dccad13638f6875b33b98d285b63.tar.bz2 |
gh-107431: Make `multiprocessing.managers.{DictProxy,ListProxy}` generic (#107433)
Make `multiprocessing.managers.{DictProxy,ListProxy}` generic for type annotation use. `ListProxy[str]` for example.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Diffstat (limited to 'Lib/test/test_genericalias.py')
-rw-r--r-- | Lib/test/test_genericalias.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_genericalias.py b/Lib/test/test_genericalias.py index bf600a0..04cb810 100644 --- a/Lib/test/test_genericalias.py +++ b/Lib/test/test_genericalias.py @@ -28,7 +28,7 @@ from fileinput import FileInput from itertools import chain from http.cookies import Morsel try: - from multiprocessing.managers import ValueProxy + from multiprocessing.managers import ValueProxy, DictProxy, ListProxy from multiprocessing.pool import ApplyResult from multiprocessing.queues import SimpleQueue as MPSimpleQueue from multiprocessing.queues import Queue as MPQueue @@ -36,6 +36,8 @@ try: except ImportError: # _multiprocessing module is optional ValueProxy = None + DictProxy = None + ListProxy = None ApplyResult = None MPSimpleQueue = None MPQueue = None @@ -134,7 +136,7 @@ class BaseTest(unittest.TestCase): if ctypes is not None: generic_types.extend((ctypes.Array, ctypes.LibraryLoader)) if ValueProxy is not None: - generic_types.extend((ValueProxy, ApplyResult, + generic_types.extend((ValueProxy, DictProxy, ListProxy, ApplyResult, MPSimpleQueue, MPQueue, MPJoinableQueue)) def test_subscriptable(self): |