diff --git a/IPython/core/async_helpers.py b/IPython/core/async_helpers.py index a5affd0..d334dba 100644 --- a/IPython/core/async_helpers.py +++ b/IPython/core/async_helpers.py @@ -60,7 +60,7 @@ def _pseudo_sync_runner(coro): return exc.value else: # TODO: do not raise but return an execution result with the right info. - raise RuntimeError(f"{coro.__name__!r} needs a real async loop") + raise RuntimeError("{coro_name!r} needs a real async loop".format(coro_name=coro.__name__)) def _asyncify(code: str) -> str: