]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-136447: Use `self.loop` instead of global `loop` variable in asyncio REPL (#136448)
authorJustin Su <injustsu@gmail.com>
Wed, 9 Jul 2025 08:57:20 +0000 (04:57 -0400)
committerGitHub <noreply@github.com>
Wed, 9 Jul 2025 08:57:20 +0000 (14:27 +0530)
Lib/asyncio/__main__.py

index 21ca5c5f62ae838cf1033b77a14a99f305e5189a..ff3a69d1e1729715eb2e009caab59d0e2b4c1ac0 100644 (file)
@@ -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()