From e9094027c9056c6ad360538d12ed9b343d388582 Mon Sep 17 00:00:00 2001 From: Aur Saraf Date: Wed, 5 Jul 2023 22:58:27 +0300 Subject: [PATCH 1/2] Fix: Pdb loops endlessly on empty file (GH-100141) --- Lib/pdb.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Lib/pdb.py b/Lib/pdb.py index 3db3e6a5be1a7b..28c56ed32c089c 100755 --- a/Lib/pdb.py +++ b/Lib/pdb.py @@ -327,8 +327,7 @@ def user_call(self, frame, argument_list): def user_line(self, frame): """This function is called when we stop or break at this line.""" if self._wait_for_mainpyfile: - if (self.mainpyfile != self.canonic(frame.f_code.co_filename) - or frame.f_lineno <= 0): + if (self.mainpyfile != self.canonic(frame.f_code.co_filename)): return self._wait_for_mainpyfile = False if self.bp_commands(frame): From c2d17cc54e8e519c5c4a8aaceaf1c5651947ee5c Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Thu, 6 Jul 2023 08:28:13 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Library/2023-07-06-08-28-12.gh-issue-100141.k3l_Z-.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Library/2023-07-06-08-28-12.gh-issue-100141.k3l_Z-.rst diff --git a/Misc/NEWS.d/next/Library/2023-07-06-08-28-12.gh-issue-100141.k3l_Z-.rst b/Misc/NEWS.d/next/Library/2023-07-06-08-28-12.gh-issue-100141.k3l_Z-.rst new file mode 100644 index 00000000000000..3582ba645a425d --- /dev/null +++ b/Misc/NEWS.d/next/Library/2023-07-06-08-28-12.gh-issue-100141.k3l_Z-.rst @@ -0,0 +1 @@ +Fix Pdb infinite loop on empty code