]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] [3.12] GH-110894: Call loop exception handler for exceptions in client_connect...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 4 Nov 2023 01:23:01 +0000 (02:23 +0100)
committerGitHub <noreply@github.com>
Sat, 4 Nov 2023 01:23:01 +0000 (01:23 +0000)
commitf7ffe4a8eac64dedd2950e334f870a5c111e4be7
tree2d7044ca07bdc42140bdc0caf33b0b22ebf8f0d4
parent89264a31eaeb71a1349edba96c090bcf026b498c
[3.11] [3.12] GH-110894: Call loop exception handler for exceptions in client_connected_cb (GH-111601) (GH-111632) (#111634)

* [3.12] GH-110894: Call loop exception handler for exceptions in client_connected_cb (GH-111601) (GH-111632)
(cherry picked from commit 9aa88290d82e2808eed84e7a63d0bf9623f84f53)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Call loop exception handler for exceptions in `client_connected_cb` of `asyncio.start_server` so that applications can handle it..
(cherry picked from commit 229f44d353c71185414a072017f46f125676bdd6)

* gh-111644: Fix asyncio test_unhandled_exceptions() (#111713)

Fix test_unhandled_exceptions() of test_asyncio.test_streams: break
explicitly a reference cycle.

Fix also StreamTests.tearDown(): the loop must not be closed
explicitly, but using set_event_loop() which takes care of shutting
down the executor with executor.shutdown(wait=True).
BaseEventLoop.close() calls executor.shutdown(wait=False).

(cherry picked from commit ac01e2243a1104b2154c0d1bdbc9f8d5b3ada778)

---------

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
Lib/asyncio/streams.py
Lib/test/test_asyncio/test_streams.py
Misc/NEWS.d/next/Library/2023-11-01-14-03-24.gh-issue-110894.7-wZxC.rst [new file with mode: 0644]