]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-136447: Use `self.loop` instead of global `loop` variable in asyncio REPL...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 9 Jul 2025 09:21:47 +0000 (11:21 +0200)
committerGitHub <noreply@github.com>
Wed, 9 Jul 2025 09:21:47 +0000 (09:21 +0000)
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 <injustsu@gmail.com>
Lib/asyncio/__main__.py

index 69f5a30cfe509591f3c1878ec6ae2807c8d569a9..878b3cae4cfc776de317485e623f0f8a02645e94 100644 (file)
@@ -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()