]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-111644: Fix asyncio test_unhandled_exceptions() (GH-111713) (#111718)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 4 Nov 2023 06:29:20 +0000 (07:29 +0100)
committerGitHub <noreply@github.com>
Sat, 4 Nov 2023 06:29:20 +0000 (06:29 +0000)
commitd15fac2a6798d0cd149c1cb3c36167863cbc19e3
tree014a9b3aa8dfbae997282462a259370709126b7b
parent02f8f781dac62112362fa8a96f5c08deccb7b27f
[3.12] gh-111644: Fix asyncio test_unhandled_exceptions() (GH-111713) (#111718)

gh-111644: Fix asyncio test_unhandled_exceptions() (GH-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: Victor Stinner <vstinner@python.org>
Lib/test/test_asyncio/test_streams.py