[Python-checkins] python/dist/src/Lib/idlelib NEWS.txt, 1.44, 1.45 PyShell.py, 1.91, 1.92

kbk at users.sourceforge.net kbk at users.sourceforge.net
Sat Nov 13 22:06:02 CET 2004


Update of /cvsroot/python/python/dist/src/Lib/idlelib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31520

Modified Files:
	NEWS.txt PyShell.py 
Log Message:
The change in the linecache.checkcache() signature at rev 1.13 caused IDLE to exit
when an exception was raised while running w/o the subprocess.  Python Bug 1063840

M NEWS.txt
M PyShell.py


Index: NEWS.txt
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/NEWS.txt,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- NEWS.txt	4 Nov 2004 05:23:17 -0000	1.44
+++ NEWS.txt	13 Nov 2004 21:05:57 -0000	1.45
@@ -3,6 +3,9 @@
 
 *Release date: XX-XXX-2004*
 
+- A change to the linecache.py API caused IDLE to exit when an exception was
+  raised while running without the subprocess (-n switch).  Python Bug 1063840.
+
 What's New in IDLE 1.1b2?
 =========================
 

Index: PyShell.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/PyShell.py,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -d -r1.91 -r1.92
--- PyShell.py	22 Aug 2004 05:14:32 -0000	1.91
+++ PyShell.py	13 Nov 2004 21:05:58 -0000	1.92
@@ -73,14 +73,16 @@
         return s
     warnings.formatwarning = idle_formatwarning
 
-def extended_linecache_checkcache(orig_checkcache=linecache.checkcache):
+def extended_linecache_checkcache(filename=None,
+                                  orig_checkcache=linecache.checkcache):
     """Extend linecache.checkcache to preserve the <pyshell#...> entries
 
-    Rather than repeating the linecache code, patch it to save the pyshell#
-    entries, call the original linecache.checkcache(), and then restore the
-    saved entries.  Assigning the orig_checkcache keyword arg freezes its value
-    at definition time to the (original) method linecache.checkcache(), i.e.
-    makes orig_checkcache lexical.
+    Rather than repeating the linecache code, patch it to save the
+    <pyshell#...> entries, call the original linecache.checkcache()
+    (which destroys them), and then restore the saved entries.
+
+    orig_checkcache is bound at definition time to the original
+    method, allowing it to be patched.
 
     """
     cache = linecache.cache



More information about the Python-checkins mailing list