fix DeprecationWarning when running asyncio tests (GH-30486)

This commit is contained in:
Kumar Aditya 2022-01-22 16:50:10 +05:30 committed by GitHub
parent 5d73524116
commit ab8fe22e5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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)