Mercurial > cpython-lru_cache-weakref
changeset 85327:5b5ef012cd4e
Issue #16809: Fixed some tkinter incompabilities with Tcl/Tk 8.6.
| author | Serhiy Storchaka <storchaka@gmail.com> |
|---|---|
| date | Thu, 22 Aug 2013 17:53:06 +0300 |
| parents | 85285e6e28f4 (current diff) 516b0cd87a90 (diff) |
| children | ac6dab1819c4 |
| files | Lib/tkinter/__init__.py Misc/NEWS |
| diffstat | 3 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/Lib/tkinter/__init__.py Thu Aug 22 17:42:05 2013 +0300 +++ b/Lib/tkinter/__init__.py Thu Aug 22 17:53:06 2013 +0300 @@ -1352,7 +1352,7 @@ value = words[i+1] if not value: value = None - elif '.' in value: + elif '.' in str(value): value = getdouble(value) else: value = getint(value) @@ -1921,7 +1921,7 @@ for i in range(0, len(words), 2): key = words[i][1:] value = words[i+1] - if value[:1] == '.': + if str(value)[:1] == '.': value = self._nametowidget(value) dict[key] = value return dict @@ -1972,7 +1972,7 @@ for i in range(0, len(words), 2): key = words[i][1:] value = words[i+1] - if value[:1] == '.': + if str(value)[:1] == '.': value = self._nametowidget(value) dict[key] = value return dict @@ -2021,7 +2021,7 @@ for i in range(0, len(words), 2): key = words[i][1:] value = words[i+1] - if value[:1] == '.': + if str(value)[:1] == '.': value = self._nametowidget(value) dict[key] = value return dict
--- a/Lib/tkinter/test/test_ttk/test_widgets.py Thu Aug 22 17:42:05 2013 +0300 +++ b/Lib/tkinter/test/test_ttk/test_widgets.py Thu Aug 22 17:53:06 2013 +0300 @@ -105,7 +105,7 @@ cbtn['command'] = '' res = cbtn.invoke() - self.assertEqual(res, '') + self.assertEqual(str(res), '') self.assertFalse(len(success) > 1) self.assertEqual(cbtn['offvalue'], cbtn.tk.globalgetvar(cbtn['variable'])) @@ -453,7 +453,7 @@ cbtn2['command'] = '' res = cbtn2.invoke() - self.assertEqual(res, '') + self.assertEqual(str(res), '') self.assertFalse(len(success) > 1) self.assertEqual(cbtn2['value'], myvar.get()) self.assertEqual(myvar.get(),
