[Python-checkins] cpython (merge 3.3 -> default): #1207589: merge with 3.3.

roger.serwy python-checkins at python.org
Sun Apr 7 19:17:02 CEST 2013


http://hg.python.org/cpython/rev/5219c1271156
changeset: 83187:5219c1271156
parent: 83184:09a84091ae96
parent: 83186:c26ec5897c5a
user: Roger Serwy <roger.serwy at gmail.com>
date: Sun Apr 07 12:17:17 2013 -0500
summary:
 #1207589: merge with 3.3.
files:
 Lib/idlelib/EditorWindow.py | 10 ++++++++--
 Misc/NEWS | 2 ++
 2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -479,7 +479,12 @@
 if iswin:
 self.text.config(cursor="arrow")
 
- for label, eventname, verify_state in self.rmenu_specs:
+ for item in self.rmenu_specs:
+ try:
+ label, eventname, verify_state = item
+ except ValueError: # see issue1207589
+ continue
+
 if verify_state is None:
 continue
 state = getattr(self, verify_state)()
@@ -497,7 +502,8 @@
 
 def make_rmenu(self):
 rmenu = Menu(self.text, tearoff=0)
- for label, eventname, _ in self.rmenu_specs:
+ for item in self.rmenu_specs:
+ label, eventname = item[0], item[1]
 if label is not None:
 def command(text=self.text, eventname=eventname):
 text.event_generate(eventname)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1015,6 +1015,8 @@
 IDLE
 ----
 
+- Issue #1207589: Backwards-compatibility patch for right-click menu in IDLE.
+
 - Issue #16887: IDLE now accepts Cancel in tabify/untabify dialog box.
 
 - Issue #14254: IDLE now handles readline correctly across shell restarts.
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /