Fix several issues relating to access to source code inside zipfiles. Initial work by Alexander Belopolsky. See Misc/NEWS in this checkin for details.
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 4a080c7..3f76032 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -440,7 +440,7 @@
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)
+ line = linecache.getline(filename, lineno, self.curframe.f_globals)
if not line:
print >>self.stdout, 'End of file'
return 0
@@ -768,7 +768,7 @@
breaklist = self.get_file_breaks(filename)
try:
for lineno in range(first, last+1):
- line = linecache.getline(filename, lineno)
+ line = linecache.getline(filename, lineno, self.curframe.f_globals)
if not line:
print >>self.stdout, '[EOF]'
break