From: Justin Su Date: Wed, 9 Jul 2025 08:57:20 +0000 (-0400) Subject: gh-136447: Use `self.loop` instead of global `loop` variable in asyncio REPL (#136448) X-Git-Tag: v3.15.0a1~1041 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=77fa7a4dcc771bf4d297ebfd4f357483d0750a1c;p=thirdparty%2FPython%2Fcpython.git gh-136447: Use `self.loop` instead of global `loop` variable in asyncio REPL (#136448) --- diff --git a/Lib/asyncio/__main__.py b/Lib/asyncio/__main__.py index 21ca5c5f62ae..ff3a69d1e172 100644 --- a/Lib/asyncio/__main__.py +++ b/Lib/asyncio/__main__.py @@ -64,7 +64,7 @@ class AsyncIOInteractiveConsole(InteractiveColoredConsole): except BaseException as exc: future.set_exception(exc) - loop.call_soon_threadsafe(callback, context=self.context) + self.loop.call_soon_threadsafe(callback, context=self.context) try: return future.result()