From ebc1e70ff9051d4a26b259929d48d3ab3f7a2ff1 2021-11-13 00:08:10 From: Matthias Bussonnier Date: 2021-11-13 00:08:10 Subject: [PATCH] Merge pull request #13269 from kkirsche/patch-1 Fix DeprecationWarning: There is no current event loop --- 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