gh-138899: fix sys.ps1 in asyncio repl (#138900)

This commit is contained in:
yihong 2025-10-01 13:49:49 +08:00 committed by GitHub
parent 800d856bc7
commit 22f7ccfad6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View file

@ -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

View file

@ -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`.