As Minjae pointed out, the error is in the checkline() method. Unfortunately, I don't have a Python 2.6 installation to hack, but maybe someone could test this in pdb.py?
Replace:
def checkline(self, filename, lineno):
"""Check whether specified line seems to be executable.
Return `lineno` if it is, 0 if not (e.g. a docstring, comment, blank
line or EOF). Warning: testing is not comprehensive.
"""
line = linecache.getline(filename, lineno, self.curframe.f_globals)
if not line:
with:
def checkline(self, filename, lineno):
"""Check whether specified line seems to be executable.
Return `lineno` if it is, 0 if not (e.g. a docstring, comment, blank
line or EOF). Warning: testing is not comprehensive.
"""
try:
line = linecache.getline(filename, lineno, self.curframe.f_globals)
except AttributeError:
line = 0
if not line:
In case anyone wants to hack away at this, here is a relevant diff (pdb.py from Python 2.6.2 vs 2.5.2):
http:// svn.python. org/view/ python/ tags/r262/ Lib/pdb. py?r1=60915& r2=71601
As Minjae pointed out, the error is in the checkline() method. Unfortunately, I don't have a Python 2.6 installation to hack, but maybe someone could test this in pdb.py?
Replace:
def checkline(self, filename, lineno):
"""Check whether specified line seems to be executable.
Return `lineno` if it is, 0 if not (e.g. a docstring, comment, blank getline( filename, lineno, self.curframe. f_globals)
line or EOF). Warning: testing is not comprehensive.
"""
line = linecache.
if not line:
with:
def checkline(self, filename, lineno):
"""Check whether specified line seems to be executable.
Return `lineno` if it is, 0 if not (e.g. a docstring, comment, blank getline( filename, lineno, self.curframe. f_globals)
line or EOF). Warning: testing is not comprehensive.
"""
try:
line = linecache.
except AttributeError:
line = 0
if not line: