summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Serwy <roger.serwy@gmail.com>2013-04-07 12:15:52 -0500
committerRoger Serwy <roger.serwy@gmail.com>2013-04-07 12:15:52 -0500
commit6b2918ae7516d8efe306f59a636601a3d3bb6f1a (patch)
tree700ac73733a8b78871653cc91713f1d7b0a6dde0
parent8b2cd75bdd22c2770960f186fb945b5de1eca524 (diff)
downloadcpython-git-6b2918ae7516d8efe306f59a636601a3d3bb6f1a.tar.gz
#1207589: Backwards-compatibility patch for right-click menu in IDLE.
-rw-r--r--Lib/idlelib/EditorWindow.py10
-rw-r--r--Misc/NEWS2
2 files changed, 10 insertions, 2 deletions
diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py
index 810f588558..343b6e4230 100644
--- a/Lib/idlelib/EditorWindow.py
+++ b/Lib/idlelib/EditorWindow.py
@@ -479,7 +479,12 @@ class EditorWindow(object):
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 @@ class EditorWindow(object):
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
index 18a78344e7..08dff45618 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -33,6 +33,8 @@ Library
IDLE
----
+- Issue #1207589: Backwards-compatibility patch for right-click menu in IDLE.
+
- Issue #16887: IDLE now accepts Cancel in tabify/untabify dialog box.
- Issue #17625: In IDLE, close the replace dialog after it is used.