From eef49c359505eaf109d519d39e53dfd3c78d066a Mon Sep 17 00:00:00 2001 From: Tian Gao Date: Thu, 24 Apr 2025 13:07:27 -0700 Subject: gh-93696: Fixed the breakpoint display error for frozen modules (#132862) --- Lib/pdb.py | 6 ------ Lib/test/test_pdb.py | 22 ++++++++++++++++++---- .../2025-04-24-01-03-40.gh-issue-93696.kM-MBp.rst | 1 + 3 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2025-04-24-01-03-40.gh-issue-93696.kM-MBp.rst diff --git a/Lib/pdb.py b/Lib/pdb.py index 160a704..38a2fbc 100644 --- a/Lib/pdb.py +++ b/Lib/pdb.py @@ -1971,12 +1971,6 @@ class Pdb(bdb.Bdb, cmd.Cmd): if last is None: last = first + 10 filename = self.curframe.f_code.co_filename - # gh-93696: stdlib frozen modules provide a useful __file__ - # this workaround can be removed with the closure of gh-89815 - if filename.startswith(" def func():', stdout, "stack entry not found") def test_empty_file(self): script = '' diff --git a/Misc/NEWS.d/next/Library/2025-04-24-01-03-40.gh-issue-93696.kM-MBp.rst b/Misc/NEWS.d/next/Library/2025-04-24-01-03-40.gh-issue-93696.kM-MBp.rst new file mode 100644 index 0000000..61448a8 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2025-04-24-01-03-40.gh-issue-93696.kM-MBp.rst @@ -0,0 +1 @@ +Fixed the breakpoint display error for frozen modules in :mod:`pdb`. -- cgit v0.12