From c1e945b5bc8fb673109cf32c4f238f6d5e0f5149 2024-12-08 10:37:11 From: M Bussonnier Date: 2024-12-08 10:37:11 Subject: [PATCH] Fix pdb issues in Python 3.13.1 For some reason it is not always set, it was/is a bug in IPython to not check. --- diff --git a/IPython/core/debugger.py b/IPython/core/debugger.py index 1f0d7b2..76c42e0 100644 --- a/IPython/core/debugger.py +++ b/IPython/core/debugger.py @@ -550,7 +550,7 @@ class Pdb(OldPdb): So if frame is self.current_frame we instead return self.curframe_locals """ - if frame is self.curframe: + if frame is getattr(self, "curframe", None): return self.curframe_locals else: return frame.f_locals