From d444aaf598d8006342422b3b50b60cc72a594fbe Mon Sep 17 00:00:00 2001 From: andrei kulakov Date: Thu, 16 Sep 2021 22:40:01 -0400 Subject: [PATCH 1/2] fix args and retval commands to handle objects with broken repr() --- Doc/library/pdb.rst | 3 +++ .../next/Library/2021-09-16-22-38-58.bpo-20853.J3kJay.rst | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2021-09-16-22-38-58.bpo-20853.J3kJay.rst diff --git a/Doc/library/pdb.rst b/Doc/library/pdb.rst index 6a401a1af7eba38..98eebf6466c0332 100644 --- a/Doc/library/pdb.rst +++ b/Doc/library/pdb.rst @@ -806,6 +806,9 @@ can be overridden by the local file. .. pdbcommand:: retval Print the return value for the last return of the current function. + This command must be used immediately after the return line is executed; + the *return* command can be used to jump to the location where *retval* + can be used. .. pdbcommand:: exceptions [excnumber] diff --git a/Misc/NEWS.d/next/Library/2021-09-16-22-38-58.bpo-20853.J3kJay.rst b/Misc/NEWS.d/next/Library/2021-09-16-22-38-58.bpo-20853.J3kJay.rst new file mode 100644 index 000000000000000..f4f88a17418ad55 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-09-16-22-38-58.bpo-20853.J3kJay.rst @@ -0,0 +1,2 @@ +In :module:`pdb`, *args* and *retval* commands were fixed to properly handle +objects for which :func:`repr` raises an exception. From 38ed5c2adae2f2a3f9f2b49e86241c652b007eea Mon Sep 17 00:00:00 2001 From: andrei kulakov Date: Thu, 16 Sep 2021 22:53:31 -0400 Subject: [PATCH 2/2] fix news entry --- .../next/Library/2021-09-16-22-38-58.bpo-20853.J3kJay.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2021-09-16-22-38-58.bpo-20853.J3kJay.rst b/Misc/NEWS.d/next/Library/2021-09-16-22-38-58.bpo-20853.J3kJay.rst index f4f88a17418ad55..8fd6ee6ba1bf8b5 100644 --- a/Misc/NEWS.d/next/Library/2021-09-16-22-38-58.bpo-20853.J3kJay.rst +++ b/Misc/NEWS.d/next/Library/2021-09-16-22-38-58.bpo-20853.J3kJay.rst @@ -1,2 +1,2 @@ -In :module:`pdb`, *args* and *retval* commands were fixed to properly handle +In :mod:`pdb`, *args* and *retval* commands were fixed to properly handle objects for which :func:`repr` raises an exception.