diff --git a/IPython/terminal/interactiveshell.py b/IPython/terminal/interactiveshell.py index b73a140..fd1e003 100644 --- a/IPython/terminal/interactiveshell.py +++ b/IPython/terminal/interactiveshell.py @@ -505,7 +505,7 @@ class TerminalInteractiveShell(InteractiveShell): # while/true inside which will freeze the prompt. try: - old_loop = asyncio.get_event_loop() + old_loop = asyncio.get_running_loop() except RuntimeError: # This happens when the user used `asyncio.run()`. old_loop = None