[Python-checkins] fix DeprecationWarning when running asyncio tests (GH-30486)

asvetlov webhook-mailer at python.org
Sat Jan 22 06:20:14 EST 2022


https://github.com/python/cpython/commit/ab8fe22e5e4e282da8ea6f4e77f4c0a6616ec9c2
commit: ab8fe22e5e4e282da8ea6f4e77f4c0a6616ec9c2
branch: main
author: Kumar Aditya <59607654+kumaraditya303 at users.noreply.github.com>
committer: asvetlov <andrew.svetlov at gmail.com>
date: 2022年01月22日T13:20:10+02:00
summary:
fix DeprecationWarning when running asyncio tests (GH-30486)
files:
M Lib/test/test_asyncio/test_windows_events.py
diff --git a/Lib/test/test_asyncio/test_windows_events.py b/Lib/test/test_asyncio/test_windows_events.py
index f276cd205a2f8e..6b4f65c3376f5d 100644
--- a/Lib/test/test_asyncio/test_windows_events.py
+++ b/Lib/test/test_asyncio/test_windows_events.py
@@ -45,7 +45,7 @@ def SIGINT_after_delay():
 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)


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /