]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-138899: fix `sys.ps1` in asyncio repl (#138900)
authoryihong <zouzou0208@gmail.com>
Wed, 1 Oct 2025 05:49:49 +0000 (13:49 +0800)
committerGitHub <noreply@github.com>
Wed, 1 Oct 2025 05:49:49 +0000 (11:19 +0530)
Lib/asyncio/__main__.py
Misc/NEWS.d/next/Library/2025-09-15-08-57-39.gh-issue-138899.Uh6fvY.rst [new file with mode: 0644]

index ff3a69d1e1729715eb2e009caab59d0e2b4c1ac0..12d6f7714ee4f4f92e6f9ca813eb61e35d9c9367 100644 (file)
@@ -113,6 +113,7 @@ class REPLThread(threading.Thread):
                     run_multiline_interactive_console,
                 )
                 try:
+                    sys.ps1 = ps1
                     run_multiline_interactive_console(console)
                 except SystemExit:
                     # expected via the `exit` and `quit` commands
diff --git a/Misc/NEWS.d/next/Library/2025-09-15-08-57-39.gh-issue-138899.Uh6fvY.rst b/Misc/NEWS.d/next/Library/2025-09-15-08-57-39.gh-issue-138899.Uh6fvY.rst
new file mode 100644 (file)
index 0000000..5c2b408
--- /dev/null
@@ -0,0 +1,3 @@
+Executing ``quit`` command in :mod:`pdb` will raise :exc:`bdb.BdbQuit` when
+:mod:`pdb` is started from an asyncio console using :func:`breakpoint` or
+:func:`pdb.set_trace`.