From: Guilherme Polo Date: Tue, 18 Aug 2009 13:23:08 +0000 (+0000) Subject: Issue #1119673: Do not override Tkinter.Text methods when creating a ScrolledText. X-Git-Tag: v2.7a1~644 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d3e6e4bb8ff2a88afd6d2cc09dd199defbef36a4;p=python Issue #1119673: Do not override Tkinter.Text methods when creating a ScrolledText. --- diff --git a/Lib/lib-tk/ScrolledText.py b/Lib/lib-tk/ScrolledText.py index 8076bc4f9e..a1ef79ca74 100644 --- a/Lib/lib-tk/ScrolledText.py +++ b/Lib/lib-tk/ScrolledText.py @@ -27,8 +27,11 @@ class ScrolledText(Text): 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': diff --git a/Misc/NEWS b/Misc/NEWS index 4b28be2bb6..ca3c5e853b 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -359,6 +359,9 @@ Core and Builtins 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