[Python-checkins] cpython (merge 2.7 -> 2.7): Null merge.

serhiy.storchaka python-checkins at python.org
Thu Dec 27 21:05:18 CET 2012


http://hg.python.org/cpython/rev/26eb2979465c
changeset:   81094:26eb2979465c
branch:      2.7
parent:      81086:ccbb16719540
parent:      81090:d3c81ef728ae
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Thu Dec 27 22:00:12 2012 +0200
summary:
  Null merge.

files:
  Lib/idlelib/EditorWindow.py |  2 +-
  Misc/NEWS                   |  3 +++
  2 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -1611,7 +1611,7 @@
         try:
             try:
                 _tokenize.tokenize(self.readline, self.tokeneater)
-            except _tokenize.TokenError:
+            except (_tokenize.TokenError, SyntaxError):
                 # since we cut off the tokenizer early, we can trigger
                 # spurious errors
                 pass
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -168,6 +168,9 @@
 Library
 -------
 
+- Issue #16504: IDLE now catches SyntaxErrors raised by tokenizer. Patch by
+  Roger Serwy.
+
 - Issue #16702: test_urllib2_localnet tests now correctly ignores proxies for
   localhost tests.
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list