mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Fix import path for asyncio.TimeoutError (#17691)
This commit is contained in:
parent
3c75f31bb2
commit
025eeaa196
2 changed files with 3 additions and 2 deletions
|
|
@ -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 @@ async def run_one_coro(
|
|||
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
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Fix import path for ``asyncio.TimeoutError``
|
||||
Loading…
Add table
Add a link
Reference in a new issue