Skip to content

Commit 1c21765

Browse files
authored
[3.9] bpo-39481: Fix duplicate SimpleQueue type in test_genericalias.py (GH-22619) (#22624)
There are two different `SimpleQueue` types imported (from `multiprocessing.queues` and `queue`) in `Lib/test/test_genericalias.py`, the second one shadowing the first one, making the first one not actually tested. Fix by using different names. Automerge-Triggered-By: @gvanrossum. (cherry picked from commit b2c0a43) Co-authored-by: Saiyang Gou <[email protected]>
1 parent 8a12503 commit 1c21765

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_genericalias.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
except ImportError:
2727
# multiprocessing.shared_memory is not available on e.g. Android
2828
ShareableList = None
29-
from multiprocessing.queues import SimpleQueue
29+
from multiprocessing.queues import SimpleQueue as MPSimpleQueue
3030
from os import DirEntry
3131
from re import Pattern, Match
3232
from types import GenericAlias, MappingProxyType, AsyncGeneratorType
@@ -79,7 +79,7 @@ def test_subscriptable(self):
7979
SplitResult, ParseResult,
8080
ValueProxy, ApplyResult,
8181
WeakSet, ReferenceType, ref,
82-
ShareableList, SimpleQueue,
82+
ShareableList, MPSimpleQueue,
8383
Future, _WorkItem,
8484
Morsel,
8585
):

0 commit comments

Comments
 (0)