]> granicus.if.org Git - python/commitdiff
Don't import wait from connection, it shadows a name (GH-13112)
authorBrian Quinlan <brian@sweetapp.com>
Tue, 7 May 2019 17:31:11 +0000 (13:31 -0400)
committerGregory P. Smith <greg@krypto.org>
Tue, 7 May 2019 17:31:11 +0000 (13:31 -0400)
(lint cleanup) This import causes an argument parameter to shadow the global import name.

Lib/concurrent/futures/process.py

index 21bf4a447f084c494d4378643bb3162e86964c64..d7e2478d9227b5f90c3b4dcc9f7fc5fcb2e18a7f 100644 (file)
@@ -51,7 +51,7 @@ from concurrent.futures import _base
 import queue
 from queue import Full
 import multiprocessing as mp
-from multiprocessing.connection import wait
+import multiprocessing.connection
 from multiprocessing.queues import Queue
 import threading
 import weakref
@@ -352,7 +352,7 @@ def _queue_management_worker(executor_reference,
         # submitted, from the executor being shutdown/gc-ed, or from the
         # shutdown of the python interpreter.
         worker_sentinels = [p.sentinel for p in processes.values()]
-        ready = wait(readers + worker_sentinels)
+        ready = mp.connection.wait(readers + worker_sentinels)
 
         cause = None
         is_broken = True