From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 9 Jul 2025 09:21:47 +0000 (+0200) Subject: [3.13] gh-136447: Use `self.loop` instead of global `loop` variable in asyncio REPL... X-Git-Tag: v3.13.6~109 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=532ecac7712b40e893ade3c870d9c66e05bbc1b8;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-136447: Use `self.loop` instead of global `loop` variable in asyncio REPL (GH-136448) (#136457) gh-136447: Use `self.loop` instead of global `loop` variable in asyncio REPL (GH-136448) (cherry picked from commit 77fa7a4dcc771bf4d297ebfd4f357483d0750a1c) Co-authored-by: Justin Su --- diff --git a/Lib/asyncio/__main__.py b/Lib/asyncio/__main__.py index 69f5a30cfe50..878b3cae4cfc 100644 --- a/Lib/asyncio/__main__.py +++ b/Lib/asyncio/__main__.py @@ -62,7 +62,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()