[Python-checkins] Fix import path for asyncio.TimeoutError (#17691)

Andrew Svetlov webhook-mailer at python.org
Tue Dec 24 05:46:46 EST 2019


https://github.com/python/cpython/commit/025eeaa19607b2a80c979668dad405f567444573
commit: 025eeaa19607b2a80c979668dad405f567444573
branch: master
author: Andrew Svetlov <andrew.svetlov at gmail.com>
committer: GitHub <noreply at github.com>
date: 2019-12-24T12:46:42+02:00
summary:

Fix import path for asyncio.TimeoutError (#17691)

files:
A Misc/NEWS.d/next/Library/2019-12-24-10-43-13.bpo-39129.jVx5rW.rst
M Lib/asyncio/staggered.py

diff --git a/Lib/asyncio/staggered.py b/Lib/asyncio/staggered.py
index 27c665a9910ab..451a53a16f383 100644
--- a/Lib/asyncio/staggered.py
+++ b/Lib/asyncio/staggered.py
@@ -6,7 +6,7 @@
 import typing
 
 from . import events
-from . import futures
+from . import exceptions as exceptions_mod
 from . import locks
 from . import tasks
 
@@ -83,7 +83,7 @@
             previous_failed: typing.Optional[locks.Event]) -> None:
         # Wait for the previous task to finish, or for delay seconds
         if previous_failed is not None:
-            with contextlib.suppress(futures.TimeoutError):
+            with contextlib.suppress(exceptions_mod.TimeoutError):
                 # Use asyncio.wait_for() instead of asyncio.wait() here, so
                 # that if we get cancelled at this point, Event.wait() is also
                 # cancelled, otherwise there will be a "Task destroyed but it is
diff --git a/Misc/NEWS.d/next/Library/2019-12-24-10-43-13.bpo-39129.jVx5rW.rst b/Misc/NEWS.d/next/Library/2019-12-24-10-43-13.bpo-39129.jVx5rW.rst
new file mode 100644
index 0000000000000..6667697671a28
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2019-12-24-10-43-13.bpo-39129.jVx5rW.rst
@@ -0,0 +1 @@
+Fix import path for ``asyncio.TimeoutError``



More information about the Python-checkins mailing list