cpython/Lib/test/test_asyncio
Miss Islington (bot) cf777399a9
[3.11] gh-111085: Fix invalid state handling in TaskGroup and Timeout (GH-111111) (GH-111172)
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).

(cherry picked from commit 6c23635f2b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: James Hilton-Balfe <gobot1234yt@gmail.com>
2023-10-21 19:40:07 +00:00
..
__init__.py
__main__.py
echo.py
echo2.py
echo3.py
functional.py
test_base_events.py [3.11] gh-110088, gh-109878: Fix test_asyncio timeouts (#110092) (#110099) 2023-09-29 14:16:15 +02:00
test_buffered_proto.py
test_context.py
test_events.py [3.11] gh-110088: Fix asyncio test_prompt_cancellation() (GH-110157) (#110159) 2023-09-30 21:01:33 +00:00
test_futures.py [3.11] gh-101326: Fix regression when passing None to FutureIter.throw (GH-101327) (#101328) 2023-01-25 13:01:13 -08:00
test_futures2.py [3.11] bpo-45924: Fix asyncio incorrect traceback when future's exception is raised multiple times (GH-30274) (#94747) 2022-07-11 14:17:32 +01:00
test_locks.py gh-97545: Make Semaphore run faster. (GH-97549) 2022-09-26 17:00:53 -07:00
test_pep492.py
test_proactor_events.py [3.11] gh-103607: Fix pause_reading to work when called from connection_made in asyncio. (GH-17425) (#103918) 2023-04-27 10:29:54 +00:00
test_protocols.py
test_queues.py
test_runners.py [3.11] Trim trailing whitespace and test on CI (GH-104275) (#108215) 2023-08-22 12:57:31 +03:00
test_selector_events.py [3.11] gh-103607: Fix pause_reading to work when called from connection_made in asyncio. (GH-17425) (#103918) 2023-04-27 10:29:54 +00:00
test_sendfile.py [3.11] gh-98174: Handle EPROTOTYPE under macOS in test_sendfile_fallback_close_peer_in_the_middle_of_receiving (GH-98316) (#98357) 2022-10-18 08:21:58 -07:00
test_server.py
test_sock_lowlevel.py [3.11] gh-109015: Add test.support.socket_helper.tcp_blackhole() (#109016) (#109042) 2023-09-07 00:34:16 +00:00
test_ssl.py gh-60203: Always pass True/False as boolean arguments in tests (GH-99983) 2022-12-04 04:50:46 -08:00
test_sslproto.py [3.11] gh-109015: Add test.support.socket_helper.tcp_blackhole() (#109016) (#109042) 2023-09-07 00:34:16 +00:00
test_streams.py [3.11] gh-93453: Only emit deprecation warning in asyncio.get_event_loop when a new event loop is created (#99949) 2022-12-06 16:15:44 +01:00
test_subprocess.py [3.11] Add support.MS_WINDOWS constant (#110446) (#110452) (#110464) 2023-10-06 10:19:49 +00:00
test_taskgroups.py [3.11] gh-111085: Fix invalid state handling in TaskGroup and Timeout (GH-111111) (GH-111172) 2023-10-21 19:40:07 +00:00
test_tasks.py [3.11] gh-93453: Only emit deprecation warning in asyncio.get_event_loop when a new event loop is created (#99949) 2022-12-06 16:15:44 +01:00
test_threads.py
test_timeouts.py [3.11] gh-111085: Fix invalid state handling in TaskGroup and Timeout (GH-111111) (GH-111172) 2023-10-21 19:40:07 +00:00
test_transports.py
test_unix_events.py [3.11] gh-93453: Only emit deprecation warning in asyncio.get_event_loop when a new event loop is created (#99949) 2022-12-06 16:15:44 +01:00
test_waitfor.py [3.11] gh-110088, gh-109878: Fix test_asyncio timeouts (#110092) (#110099) 2023-09-29 14:16:15 +02:00
test_windows_events.py [3.11] gh-110088, gh-109878: Fix test_asyncio timeouts (#110092) (#110099) 2023-09-29 14:16:15 +02:00
test_windows_utils.py
utils.py [3.11] gh-111085: Fix invalid state handling in TaskGroup and Timeout (GH-111111) (GH-111172) 2023-10-21 19:40:07 +00:00