cpython/Lib/asyncio
Serhiy Storchaka 6c23635f2b
gh-111085: Fix invalid state handling in TaskGroup and Timeout (#111111)
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>
2023-10-21 22:18:34 +03:00
..
__init__.py gh-106075: add `asyncio.taskgroups.__all__` to `asyncio.__all__` (#106090) 2023-06-26 07:54:03 +00:00
__main__.py
base_events.py gh-110771: Decompose run_forever() into parts (#110773) 2023-10-13 14:12:32 +00:00
base_futures.py
base_subprocess.py GH-100133: fix `asyncio` subprocess losing `stderr` and `stdout` output (#100154) 2022-12-21 15:20:26 +05:30
base_tasks.py gh-97696: asyncio eager tasks factory (#102853) 2023-05-01 15:10:13 -06:00
constants.py
coroutines.py GH-102748: remove legacy support for generator based coroutines from `asyncio.iscoroutine` (#102749) 2023-03-16 20:28:10 +05:30
events.py gh-106634: Corrected minor asyncio doc issues (#106671) 2023-07-13 13:21:13 +05:30
exceptions.py
format_helpers.py
futures.py
locks.py
log.py
mixins.py
proactor_events.py
protocols.py
queues.py
runners.py
selector_events.py gh-106527: asyncio: optimize to add/remove readers and writers (#106528) 2023-07-22 21:07:40 +00:00
sslproto.py gh-108903: Remove unneeded `lambda`s from `asyncio` (GH-108904) 2023-09-05 18:11:12 +03:00
staggered.py
streams.py Remove loop from docstring for asyncio.streams.open_connection (#108528) 2023-09-26 20:34:15 -07:00
subprocess.py gh-109709: Fix asyncio test_stdin_broken_pipe() (#109710) 2023-09-22 15:29:42 +02:00
taskgroups.py gh-111085: Fix invalid state handling in TaskGroup and Timeout (#111111) 2023-10-21 22:18:34 +03:00
tasks.py gh-110961: Fixed asyncio.wait docstring to remove deprecated coroutine reference (#111017) 2023-10-18 04:40:26 +00:00
threads.py
timeouts.py gh-111085: Fix invalid state handling in TaskGroup and Timeout (#111111) 2023-10-21 22:18:34 +03:00
transports.py
trsock.py
unix_events.py remove redundant call to attach_loop in watcher (#110847) 2023-10-14 10:24:02 +02:00
windows_events.py gh-110771: Decompose run_forever() into parts (#110773) 2023-10-13 14:12:32 +00:00
windows_utils.py