diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2019-12-24 10:46:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-24 10:46:42 (GMT) |
commit | 025eeaa19607b2a80c979668dad405f567444573 (patch) | |
tree | e9caca1be9eb089e601cd2f64f5a38f85dd112fd /Lib/asyncio | |
parent | 3c75f31bb2b88b3e3d858448e789b2c0d2e3e082 (diff) | |
download | cpython-025eeaa19607b2a80c979668dad405f567444573.zip cpython-025eeaa19607b2a80c979668dad405f567444573.tar.gz cpython-025eeaa19607b2a80c979668dad405f567444573.tar.bz2 |
Fix import path for asyncio.TimeoutError (#17691)
Diffstat (limited to 'Lib/asyncio')
-rw-r--r-- | Lib/asyncio/staggered.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/asyncio/staggered.py b/Lib/asyncio/staggered.py index 27c665a..451a53a 100644 --- a/Lib/asyncio/staggered.py +++ b/Lib/asyncio/staggered.py @@ -6,7 +6,7 @@ import contextlib import typing from . import events -from . import futures +from . import exceptions as exceptions_mod from . import locks from . import tasks @@ -83,7 +83,7 @@ async def staggered_race( 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 |