]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix DeprecationWarning when running asyncio tests (GH-30486)
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Sat, 22 Jan 2022 11:20:10 +0000 (16:50 +0530)
committerGitHub <noreply@github.com>
Sat, 22 Jan 2022 11:20:10 +0000 (13:20 +0200)
Lib/test/test_asyncio/test_windows_events.py

index f276cd205a2f8e9de5fb2b69522f200b31214044..6b4f65c3376f5d2b7f2ed8544c8f63c466d5e61f 100644 (file)
@@ -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)