From 1f5cc1e52104b53e2216ad34057c3b8e406d4a48 Mon Sep 17 00:00:00 2001 From: Tian Gao Date: Fri, 7 Feb 2025 12:18:26 -0500 Subject: [PATCH 1/2] Add documentation and whatsnew entry for pdb exit change --- Doc/library/pdb.rst | 11 +++++++++++ Doc/whatsnew/3.14.rst | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/Doc/library/pdb.rst b/Doc/library/pdb.rst index f9d1213fb6d29d..f6d0177a566f71 100644 --- a/Doc/library/pdb.rst +++ b/Doc/library/pdb.rst @@ -697,6 +697,17 @@ can be overridden by the local file. .. pdbcommand:: q(uit) Quit from the debugger. The program being executed is aborted. + An end-of-file input is equivalent to :pdbcmd:`quit`. + + A confirmation prompt will be shown if the debugger is invoked in + ``'inline'`` mode. Either ``y``, ``Y``, ```` or ``EOF`` + will confirm the quit. + + .. versionchanged:: 3.14 + A confirmation prompt will be shown if the debugger is invoked in + ``'inline'`` mode. After the confirmation, the debugger will call + :func:`sys.exit` immediately, instead of raising :exc:`BdbQuit` in + the next trace event. .. pdbcommand:: debug code diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 1e469e8738bfcb..20e623090f1a8d 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -632,6 +632,11 @@ pdb command when :mod:`pdb` is in ``inline`` mode. (Contributed by Tian Gao in :gh:`123757`.) +* A confirmation prompt will be shown when the user tries to quit :mod:`pdb` + in ``inline`` mode. ``y``, ``Y``, ```` or ``EOF`` will confirm + the quit and call :func:`sys.exit`, instead of raising :exc:`BdbQuit`. + (Contributed by Tian Gao in :gh:`124704`.) + pickle ------ From ae88bbecf890cdbbe19a026942537281b27bd6cc Mon Sep 17 00:00:00 2001 From: Tian Gao Date: Fri, 7 Feb 2025 12:59:03 -0500 Subject: [PATCH 2/2] Fix bdbquit ref --- Doc/library/pdb.rst | 4 ++-- Doc/whatsnew/3.14.rst | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/library/pdb.rst b/Doc/library/pdb.rst index f6d0177a566f71..bdd89d127491a5 100644 --- a/Doc/library/pdb.rst +++ b/Doc/library/pdb.rst @@ -706,8 +706,8 @@ can be overridden by the local file. .. versionchanged:: 3.14 A confirmation prompt will be shown if the debugger is invoked in ``'inline'`` mode. After the confirmation, the debugger will call - :func:`sys.exit` immediately, instead of raising :exc:`BdbQuit` in - the next trace event. + :func:`sys.exit` immediately, instead of raising :exc:`bdb.BdbQuit` + in the next trace event. .. pdbcommand:: debug code diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index 20e623090f1a8d..2cca93b98b4b85 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -634,7 +634,7 @@ pdb * A confirmation prompt will be shown when the user tries to quit :mod:`pdb` in ``inline`` mode. ``y``, ``Y``, ```` or ``EOF`` will confirm - the quit and call :func:`sys.exit`, instead of raising :exc:`BdbQuit`. + the quit and call :func:`sys.exit`, instead of raising :exc:`bdb.BdbQuit`. (Contributed by Tian Gao in :gh:`124704`.)