https://github.com/python/cpython/commit/22f7ccfad674e54e63150bcb42cfaf40ea78943a
commit: 22f7ccfad674e54e63150bcb42cfaf40ea78943a
branch: main
author: yihong <[email protected]>
committer: kumaraditya303 <[email protected]>
date: 2025-10-01T11:19:49+05:30
summary:
gh-138899: fix `sys.ps1` in asyncio repl (#138900)
files:
A Misc/NEWS.d/next/Library/2025-09-15-08-57-39.gh-issue-138899.Uh6fvY.rst
M Lib/asyncio/__main__.py
diff --git a/Lib/asyncio/__main__.py b/Lib/asyncio/__main__.py
index ff3a69d1e17297..12d6f7714ee4f4 100644
--- a/Lib/asyncio/__main__.py
+++ b/Lib/asyncio/__main__.py
@@ -113,6 +113,7 @@ def run(self):
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
index 00000000000000..5c2b408ee907bb
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2025-09-15-08-57-39.gh-issue-138899.Uh6fvY.rst
@@ -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`.
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]