Commit graph

2 commits

Author SHA1 Message Date
Victor Stinner
3ceb4b8d3a
gh-84623: Remove unused imports in tests (#93772) 2022-06-13 16:56:03 +02:00
Andrew Svetlov
f537b2a4fb
bpo-46771: Implement asyncio context managers for handling timeouts (GH-31394)
Example:

async with asyncio.timeout(5):
    await some_task()

Will interrupt the await and raise TimeoutError if some_task() takes longer than 5 seconds.

Co-authored-by: Guido van Rossum <guido@python.org>
2022-03-10 08:05:20 -08:00