Skip to content

gh-65052: fixed PDB's args and retval commands to handle objects with broken repr() - #28400

Closed
akulakov wants to merge 2 commits into
python:mainfrom
akulakov:20853-Fix-PDB-args-bad-repr
Closed

akulakov wants to merge 2 commits into
python:mainfrom
akulakov:20853-Fix-PDB-args-bad-repr

Conversation

@akulakov

@akulakov akulakov commented Sep 17, 2021 •

Copy link
Copy Markdown
Contributor

Also expanded docs for retval cmd -- I found them confusing and insufficient when working on this issue.

https://bugs.python.org/issue20853

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Oct 18, 2021
@MaxwellDupre

Copy link
Copy Markdown
Contributor

I get:
./python -m test -vvv test_pdb
== CPython 3.11.0a5+ (heads/main:92a8fd08c7, Mar 1 2022, 17:51:16) [GCC 11.2.0]
== Linux-5.13.0-30-generic-x86_64-with-glibc2.34 little-endian
== cwd: /home/me/Documents/cpython/build/test_python_28417æ
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
0:00:00 load avg: 0.94 Run tests sequentially
0:00:00 load avg: 0.94 [1/1] test_pdb
test test_pdb crashed -- Traceback (most recent call last):
File "/home/me/Documents/cpython/Lib/test/libregrtest/runtest.py", line 340, in _runtest_inner
refleak = _runtest_inner2(ns, test_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/me/Documents/cpython/Lib/test/libregrtest/runtest.py", line 280, in _runtest_inner2
the_module = importlib.import_module(abstest)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/me/Documents/cpython/Lib/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1206, in _gcd_import
File "", line 1178, in _find_and_load
File "", line 1149, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 924, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/me/Documents/cpython/Lib/test/test_pdb.py", line 18, in
from test.test_doctest import _FakeInput
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/me/Documents/cpython/Lib/test/test_doctest.py", line 2816, in
if supports_unicode and not support.has_no_debug_ranges():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/me/Documents/cpython/Lib/test/support/init.py", line 433, in has_no_debug_ranges
return bool(config['no_debug_ranges'])
~~~~~~^^^^^^^^^^^^^^^^^^^
KeyError: 'no_debug_ranges'

test_pdb failed (uncaught exception)

== Tests result: FAILURE ==

1 test failed:
test_pdb

Total duration: 205 ms
Tests result: FAILURE

@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Apr 9, 2026
@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label May 11, 2026
@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Aug 12, 2026
@serhiy-storchaka serhiy-storchaka changed the title bpo-20853: fixed PDB's args and retval commands to handle objects with broken repr() gh-65052: fixed PDB's args and retval commands to handle objects with broken repr() Aug 12, 2026
@ambv
ambv force-pushed the 20853-Fix-PDB-args-bad-repr branch from d2a6d61 to 38ed5c2 Compare October 20, 2026 20:57
@ambv
ambv requested a review from gaogaotiantian as a code owner October 20, 2026 20:57
@bedevere-app bedevere-app Bot added the type-feature A feature request or enhancement label Oct 20, 2026
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35281109 | 📁 Comparing 38ed5c2 against main (39bc958)

  🔍 Preview build  

2 files changed
± library/pdb.html
± whatsnew/changelog.html

@ambv

ambv commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Looks like this was handled by #110578.

@ambv ambv closed this Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants