gh-133016: Fix a reference to removed asyncio.futures.TimeoutError (#133019)

Just use the builtin `TimeoutError`, and remove the import of `futures`.
This commit is contained in:
John 2025-04-26 13:57:08 -05:00 committed by GitHub
parent 5e96e4fca8
commit 8d6d7386a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,7 +28,6 @@ except ImportError: # pragma: no cover
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
@ -104,7 +103,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):