gh-130322: drop deprecation of asyncio.set_event_loop (#132349)

This commit is contained in:
Kumar Aditya 2025-04-12 12:03:52 +05:30 committed by GitHub
parent e6ef47ac22
commit 05d27a84f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 46 additions and 64 deletions

View file

@ -540,7 +540,7 @@ class TestCase(unittest.TestCase):
if loop is None:
raise AssertionError('loop is None')
# ensure that the event loop is passed explicitly in asyncio
events._set_event_loop(None)
events.set_event_loop(None)
if cleanup:
self.addCleanup(self.close_loop, loop)
@ -553,7 +553,7 @@ class TestCase(unittest.TestCase):
self._thread_cleanup = threading_helper.threading_setup()
def tearDown(self):
events._set_event_loop(None)
events.set_event_loop(None)
# Detect CPython bug #23353: ensure that yield/yield-from is not used
# in an except block of a generator