mirror of
https://github.com/python/cpython.git
synced 2026-05-17 01:49:12 -04:00
fix DeprecationWarning when running asyncio tests (GH-30486)
This commit is contained in:
@@ -45,7 +45,7 @@ class ProactorLoopCtrlC(test_utils.TestCase):
|
||||
signal.raise_signal(signal.SIGINT)
|
||||
|
||||
thread = threading.Thread(target=SIGINT_after_delay)
|
||||
loop = asyncio.get_event_loop()
|
||||
loop = asyncio.new_event_loop()
|
||||
try:
|
||||
# only start the loop once the event loop is running
|
||||
loop.call_soon(thread.start)
|
||||
|
||||
Reference in New Issue
Block a user