mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-127949: deprecate asyncio.set_event_loop
(#128218)
Deprecate `asyncio.set_event_loop` to be removed in Python 3.16.
This commit is contained in:
parent
3ddd70ceaa
commit
9fce906825
16 changed files with 77 additions and 55 deletions
|
@ -541,7 +541,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)
|
||||
|
||||
|
@ -554,7 +554,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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue