]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-124703: Add documentation and whatsnew entry for pdb exit change (#129818)
authorTian Gao <gaogaotiantian@hotmail.com>
Sat, 8 Feb 2025 02:02:46 +0000 (21:02 -0500)
committerGitHub <noreply@github.com>
Sat, 8 Feb 2025 02:02:46 +0000 (21:02 -0500)
Doc/library/pdb.rst
Doc/whatsnew/3.14.rst

index f9d1213fb6d29d2a79982811cc10ab0e15db35ac..bdd89d127491a53f231053c23a100b6c24e1b4a2 100644 (file)
@@ -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``, ``<Enter>`` 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:`bdb.BdbQuit`
+      in the next trace event.
 
 .. pdbcommand:: debug code
 
index 0f119d10819d260c9d620da64ddf058d388a7082..9ac0e6ed2a6d404a87c0794218b35dd2aa708d68 100644 (file)
@@ -641,6 +641,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``, ``<Enter>`` or ``EOF`` will confirm
+  the quit and call :func:`sys.exit`, instead of raising :exc:`bdb.BdbQuit`.
+  (Contributed by Tian Gao in :gh:`124704`.)
+
 
 pickle
 ------