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
__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
base_tasks.py
constants.py
coroutines.py
events.py
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
sslproto.py
staggered.py
streams.py Remove loop from docstring for asyncio.streams.open_connection (#108528) 2023-09-26 20:34:15 -07:00
subprocess.py
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