summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2004-11-13 21:05:58 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2004-11-13 21:05:58 (GMT)
commitf7a8899f33fb0a1efe6cb57fc1b712fa1059d0a6 (patch)
tree6a0ab84dde5560accfe488cb0be387cc77fe2220 /Lib/idlelib
parent1681b622515e2c174d59e79746579e71339adc04 (diff)
downloadcpython-f7a8899f33fb0a1efe6cb57fc1b712fa1059d0a6.zip
cpython-f7a8899f33fb0a1efe6cb57fc1b712fa1059d0a6.tar.gz
cpython-f7a8899f33fb0a1efe6cb57fc1b712fa1059d0a6.tar.bz2
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
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/NEWS.txt3
-rw-r--r--Lib/idlelib/PyShell.py14
2 files changed, 11 insertions, 6 deletions
diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt
index 4df9fa5..931d67e 100644
--- a/Lib/idlelib/NEWS.txt
+++ b/Lib/idlelib/NEWS.txt
@@ -3,6 +3,9 @@ What's New in IDLE 1.1b3/rc1?
*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?
=========================
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index 313c95d..887d638 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -73,14 +73,16 @@ else:
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