From: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Date: Sat, 22 Jan 2022 11:20:10 +0000 (+0530) Subject: fix DeprecationWarning when running asyncio tests (GH-30486) X-Git-Tag: v3.11.0a5~161 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ab8fe22e5e4e282da8ea6f4e77f4c0a6616ec9c2;p=thirdparty%2FPython%2Fcpython.git fix DeprecationWarning when running asyncio tests (GH-30486) --- diff --git a/Lib/test/test_asyncio/test_windows_events.py b/Lib/test/test_asyncio/test_windows_events.py index f276cd205a2f..6b4f65c3376f 100644 --- a/Lib/test/test_asyncio/test_windows_events.py +++ b/Lib/test/test_asyncio/test_windows_events.py @@ -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)