mirror of
https://github.com/python/cpython.git
synced 2025-11-07 17:12:03 +00:00
[3.13] gh-133016: Fix a reference to removed asyncio.futures.TimeoutError (GH-133019) (#133023)
gh-133016: Fix a reference to removed `asyncio.futures.TimeoutError` (GH-133019)
Just use the builtin `TimeoutError`, and remove the import of `futures`.
(cherry picked from commit 8d6d7386a3)
Co-authored-by: John <john-xyz@outlook.com>
This commit is contained in:
parent
4031902949
commit
3a1a2a0b49
1 changed files with 1 additions and 2 deletions
|
|
@ -28,7 +28,6 @@
|
|||
from asyncio import base_events
|
||||
from asyncio import events
|
||||
from asyncio import format_helpers
|
||||
from asyncio import futures
|
||||
from asyncio import tasks
|
||||
from asyncio.log import logger
|
||||
from test import support
|
||||
|
|
@ -120,7 +119,7 @@ def run_until(loop, pred, timeout=support.SHORT_TIMEOUT):
|
|||
loop.run_until_complete(tasks.sleep(delay))
|
||||
delay = max(delay * 2, 1.0)
|
||||
else:
|
||||
raise futures.TimeoutError()
|
||||
raise TimeoutError()
|
||||
|
||||
|
||||
def run_once(loop):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue