changeset: 96542:0dd70c2c44b4 parent: 96540:73acb8c187d4 parent: 96541:fb05c1355a90 user: Serhiy Storchaka date: Mon Jun 08 18:44:30 2015 +0300 files: Misc/NEWS description: Issue #24408: Fixed AttributeError in measure() and metrics() methods of tkinter.Font. diff -r 73acb8c187d4 -r 0dd70c2c44b4 Lib/tkinter/font.py --- a/Lib/tkinter/font.py Mon Jun 08 12:44:43 2015 +0300 +++ b/Lib/tkinter/font.py Mon Jun 08 18:44:30 2015 +0300 @@ -151,7 +151,7 @@ args = (text,) if displayof: args = ('-displayof', displayof, text) - return self._root.tk.getint(self._call("font", "measure", self.name, *args)) + return self._tk.getint(self._call("font", "measure", self.name, *args)) def metrics(self, *options, **kw): """Return font metrics. @@ -164,13 +164,13 @@ args = ('-displayof', displayof) if options: args = args + self._get(options) - return self._root.tk.getint( + return self._tk.getint( self._call("font", "metrics", self.name, *args)) else: res = self._split(self._call("font", "metrics", self.name, *args)) options = {} for i in range(0, len(res), 2): - options[res[i][1:]] = self._root.tk.getint(res[i+1]) + options[res[i][1:]] = self._tk.getint(res[i+1]) return options diff -r 73acb8c187d4 -r 0dd70c2c44b4 Misc/NEWS --- a/Misc/NEWS Mon Jun 08 12:44:43 2015 +0300 +++ b/Misc/NEWS Mon Jun 08 18:44:30 2015 +0300 @@ -27,6 +27,9 @@ Library ------- +- Issue #24408: Fixed AttributeError in measure() and metrics() methods of + tkinter.Font. + - Issue #14373: C implementation of functools.lru_cache() now can be used with methods.