[Python-checkins] r74507 - in python/trunk: Lib/lib-tk/ScrolledText.py Misc/NEWS

guilherme.polo python-checkins at python.org
Tue Aug 18 15:23:08 CEST 2009


Author: guilherme.polo
Date: Tue Aug 18 15:23:08 2009
New Revision: 74507

Log:
Issue #1119673: Do not override Tkinter.Text methods when creating a ScrolledText.

Modified:
   python/trunk/Lib/lib-tk/ScrolledText.py
   python/trunk/Misc/NEWS

Modified: python/trunk/Lib/lib-tk/ScrolledText.py
==============================================================================
--- python/trunk/Lib/lib-tk/ScrolledText.py	(original)
+++ python/trunk/Lib/lib-tk/ScrolledText.py	Tue Aug 18 15:23:08 2009
@@ -27,8 +27,11 @@
         self.pack(side=LEFT, fill=BOTH, expand=True)
         self.vbar['command'] = self.yview
 
-        # Copy geometry methods of self.frame -- hack!
+        # Copy geometry methods of self.frame without overriding Text
+        # methods -- hack!
+        text_meths = vars(Text).keys()
         methods = vars(Pack).keys() + vars(Grid).keys() + vars(Place).keys()
+        methods = set(methods).difference(text_meths)
 
         for m in methods:
             if m[0] != '_' and m != 'config' and m != 'configure':

Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS	(original)
+++ python/trunk/Misc/NEWS	Tue Aug 18 15:23:08 2009
@@ -359,6 +359,9 @@
 Library
 -------
 
+- Issue #1119673: Do not override Tkinter.Text methods when creating a
+  ScrolledText.
+
 - Issue #6665: Fix fnmatch to properly match filenames with newlines in them.
 
 - Issue #1135: Add the XView and YView mix-ins to avoid duplicating


More information about the Python-checkins mailing list