aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/asyncio/timeouts.py
Commit message (Collapse)AuthorAge
* gh-128559: Remove typing import from asyncio.timeouts (#128560)Michael H2025-01-06
|
* gh-96037: Always insert TimeoutError when exit an expired asyncio.timeout() ↵Serhiy Storchaka2024-01-10
| | | | | | | | block (GH-113819) If other exception was raised during exiting an expired asyncio.timeout() block, insert TimeoutError in the exception context just above the CancelledError.
* gh-113848: Handle CancelledError subclasses in asyncio TaskGroup() and ↵Serhiy Storchaka2024-01-09
| | | | timeout() (GH-113850)
* gh-111085: Fix invalid state handling in TaskGroup and Timeout (#111111)Serhiy Storchaka2023-10-21
| | | | | | | | | | | | | | | | asyncio.TaskGroup and asyncio.Timeout classes now raise proper RuntimeError if they are improperly used. * When they are used without entering the context manager. * When they are used after finishing. * When the context manager is entered more than once (simultaneously or sequentially). * If there is no current task when entering the context manager. They now remain in a consistent state after an exception is thrown, so subsequent operations can be performed correctly (if they are allowed). Co-authored-by: James Hilton-Balfe <gobot1234yt@gmail.com>
* gh-102780: Fix uncancel() call in asyncio timeouts (#102815)Kristján Valur Jónsson2023-03-22
| | | | | | | Also use `raise TimeOut from <CancelledError instance>` so that the CancelledError is set in the `__cause__` field rather than in the `__context__` field. Co-authored-by: Guido van Rossum <gvanrossum@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-102810: Add docstrings to the public-facing methods of `asyncio.Timeout` ↵JosephSBoyle2023-03-19
| | | | | | (#102811) Co-authored-by: Guido van Rossum <gvanrossum@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-95051: ensure that timeouts scheduled with `asyncio.Timeout` that have ↵Thomas Grainger2022-07-24
| | | | | | already expired are deliverered promptly (#95109) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* bpo-46771: Implement asyncio context managers for handling timeouts (GH-31394)Andrew Svetlov2022-03-10
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>