[Python-checkins] cpython (2.7): Issue #16809: Fixed some tkinter incompabilities with Tcl/Tk 8.6.
serhiy.storchaka
python-checkins at python.org
Thu Aug 22 16:56:05 CEST 2013
http://hg.python.org/cpython/rev/06244031b608
changeset: 85328:06244031b608
branch: 2.7
parent: 85325:2d96764a66fa
user: Serhiy Storchaka <storchaka at gmail.com>
date: Thu Aug 22 17:53:16 2013 +0300
summary:
Issue #16809: Fixed some tkinter incompabilities with Tcl/Tk 8.6.
files:
Lib/lib-tk/Tkinter.py | 8 ++++----
Lib/lib-tk/test/test_ttk/test_widgets.py | 4 ++--
Misc/NEWS | 2 ++
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -1347,7 +1347,7 @@
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 @@
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 @@
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 @@
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
diff --git a/Lib/lib-tk/test/test_ttk/test_widgets.py b/Lib/lib-tk/test/test_ttk/test_widgets.py
--- a/Lib/lib-tk/test/test_ttk/test_widgets.py
+++ b/Lib/lib-tk/test/test_ttk/test_widgets.py
@@ -104,7 +104,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']))
@@ -452,7 +452,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(),
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -32,6 +32,8 @@
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.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list