mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
fix DeprecationWarning when running asyncio tests (GH-30486)
This commit is contained in:
parent
5d73524116
commit
ab8fe22e5e
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue