mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-130322: drop deprecation of asyncio.set_event_loop
(#132349)
This commit is contained in:
parent
e6ef47ac22
commit
05d27a84f4
16 changed files with 46 additions and 64 deletions
|
@ -336,10 +336,10 @@ class BaseEventLoopTests(test_utils.TestCase):
|
|||
if create_loop:
|
||||
loop2 = base_events.BaseEventLoop()
|
||||
try:
|
||||
asyncio._set_event_loop(loop2)
|
||||
asyncio.set_event_loop(loop2)
|
||||
self.check_thread(loop, debug)
|
||||
finally:
|
||||
asyncio._set_event_loop(None)
|
||||
asyncio.set_event_loop(None)
|
||||
loop2.close()
|
||||
else:
|
||||
self.check_thread(loop, debug)
|
||||
|
@ -695,7 +695,7 @@ class BaseEventLoopTests(test_utils.TestCase):
|
|||
|
||||
loop = Loop()
|
||||
self.addCleanup(loop.close)
|
||||
asyncio._set_event_loop(loop)
|
||||
asyncio.set_event_loop(loop)
|
||||
|
||||
def run_loop():
|
||||
def zero_error():
|
||||
|
@ -1988,7 +1988,7 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
|
|||
async def stop_loop_coro(loop):
|
||||
loop.stop()
|
||||
|
||||
asyncio._set_event_loop(self.loop)
|
||||
asyncio.set_event_loop(self.loop)
|
||||
self.loop.set_debug(True)
|
||||
self.loop.slow_callback_duration = 0.0
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue