]> granicus.if.org Git - python/commitdiff
Issue #16809: Fixed some tkinter incompabilities with Tcl/Tk 8.6.
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 22 Aug 2013 14:53:16 +0000 (17:53 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Thu, 22 Aug 2013 14:53:16 +0000 (17:53 +0300)
Lib/lib-tk/Tkinter.py
Lib/lib-tk/test/test_ttk/test_widgets.py
Misc/NEWS

index 6947bcc41bcc715fc56026c63cd9b47b53fbdfc8..529a3e4b161ff2a59b2bba1e625dad1d0dfe0950 100644 (file)
@@ -1347,7 +1347,7 @@ class Misc:
                 value = words[i+1]
                 if not value:
                     value = None
-                elif '.' in value:
+                elif '.' in str(value):
                     value = getdouble(value)
                 else:
                     value = getint(value)
@@ -1880,7 +1880,7 @@ class Pack:
         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
@@ -1931,7 +1931,7 @@ class Place:
         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
@@ -1980,7 +1980,7 @@ class Grid:
         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
index 2fcb3fa781601b91bf0275959b61110b89495316..c594602dd3534a44d033e28533b7c80365e5e6da 100644 (file)
@@ -104,7 +104,7 @@ class CheckbuttonTest(unittest.TestCase):
 
         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']))
@@ -452,7 +452,7 @@ class RadiobuttonTest(unittest.TestCase):
 
         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(),
index 573961030efaddf284d967aaf711e50bccfff582..e93858a3339fc35544e19e7579b9a1ee4afb4eff 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -32,6 +32,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #16809: Fixed some tkinter incompabilities with Tcl/Tk 8.6.
+
 - Issue #16809: Tkinter's splitlist() and split() methods now accept Tcl_Obj
   argument.