diff --git a/IPython/terminal/interactiveshell.py b/IPython/terminal/interactiveshell.py index c7d4167..1ea9e7e 100644 --- a/IPython/terminal/interactiveshell.py +++ b/IPython/terminal/interactiveshell.py @@ -461,7 +461,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