This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: curframe can be None in pdb.py
Type: crash Stage: resolved
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: Jacek.Pliszka, iritkatriel
Priority: normal Keywords:

Created on 2016-04-18 07:47 by Jacek.Pliszka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (4)
msg263652 - (view) Author: Jacek Pliszka (Jacek.Pliszka) Date: 2016-04-18 07:47
In /usr/lib64/python2.7/pdb.py in
Pdb.default there is line:

globals = self.curframe.f_globals

curframe can be None so the line should be replaced by:

globals = getattr(self.curframe, "f_globals", None) if hasattr(self, 'curframe') else None

or something should be done in different way in setup
msg375777 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-08-21 23:17
Jacek, did you see this happen?

My reading of the code is that curframe is initialized in setup(), which is called before curframe is accessed.  It can later be modified in _select_frame.
msg375778 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-08-21 23:25
Maybe it was fixed in issue9230
msg375797 - (view) Author: Jacek Pliszka (Jacek.Pliszka) Date: 2020-08-22 12:35
Haven't seen it since then.

Stopped using 2.7 - using 3.6 in production and 3.7 in development now.

I believe it can be closed.
History
Date User Action Args
2022-04-11 14:58:29adminsetgithub: 70981
2020-10-19 22:29:44iritkatrielsetstatus: open -> closed
resolution: out of date
stage: resolved
2020-09-19 19:01:53georg.brandlsetnosy: - georg.brandl
2020-08-22 12:35:24Jacek.Pliszkasetmessages: + msg375797
2020-08-21 23:25:39iritkatrielsetmessages: + msg375778
2020-08-21 23:17:42iritkatrielsetnosy: + iritkatriel
messages: + msg375777
2016-04-18 08:10:56SilentGhostsetnosy: + georg.brandl
2016-04-18 07:47:44Jacek.Pliszkacreate