This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Python 2.7 Spinbox Format Behaves Differently On Windows Versus Linux
Type: behavior Stage: resolved
Components: Tkinter Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: zach.ware Nosy List: benjamin.peterson, gpolo, mboldisc, ned.deily, python-dev, serhiy.storchaka, zach.ware
Priority: normal Keywords: patch

Created on 2014-04-18 20:31 by mboldisc, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue21303-2.7-tcl-upgrade.diff zach.ware, 2014-04-22 15:49 review
Messages (12)
msg216800 - (view) Author: Michael Boldischar (mboldisc) Date: 2014-04-18 20:31
Here is my code:

   self._image_set_number = Spinbox(self._ramp_group, from_=0, to=999, command=self.reset_rep, format="%03.0f")
   self._repetition_change = Spinbox(self._ramp_group, from_=00, to=99, format="%02.0f")

On Linux, the spinners behave as expected. There are always three digits in "_image_set_number" and two digits in "_repetition_change". The values are padded on the left by zeros. When I use the small arrows to increase the value, it works as expected.

But, on Windows 7 64-bit, the small arrows do not behave as expected. They go up to "008" and then go back to "000" on the next click. Am I missing something or is this a bug in the the Windows version of Tkinter?
msg216801 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-04-18 20:42
Can you tell us some version numbers, please?  Specifically, which micro version of Python 2.7 (e.g. 2.7.6) on both platforms, and what version of Tcl on Linux?  Tcl on Windows should be version 8.5.2; if it's different, please tell us that too.  Here's the easiest way to get the Tcl version:

>>> import Tkinter
>>> root = Tkinter.Tcl()
>>> root.tk.eval('info patchlevel')
'8.5.2'
msg216941 - (view) Author: Michael Boldischar (mboldisc) Date: 2014-04-21 12:43
Windows 7 64-bit:
>>> root.tk.eval('info patchlevel')
'8.5.2'

Debian 7 Linux 64-bit:
root.tk.eval('info patchlevel')
'8.5.11'
msg216942 - (view) Author: Michael Boldischar (mboldisc) Date: 2014-04-21 12:46
Windows 7 64-bit:
python --version
Python 2.7.6

Debian 7 Linux 64-bit:
$ python --version
Python 2.7.3
msg216947 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-04-21 15:54
From some testing, this looks like a Tcl/Tk bug, fixed somewhere between 8.5.9 and 8.5.11: Python 3.2.5 which shipped with Tcl/Tk 8.5.9 shows this bug; Python 3.3.5 which shipped with Tcl/Tk 8.5.11 does not, and Python 2.7 built with Tcl/Tk 8.5.11 doesn't show it.  Tcl/Tk 8.6.1 is also free of the bug.

Benjamin, what's your take on updating the version of Tcl/Tk shipped with the next Python 2.7 Windows installer?  Updating to a newer 8.5 is just a matter of changing paths in the buildbot scripts (and making sure whoever does the installer since Martin has retired knows about it); updating to 8.6 also requires some minor updates to PCbuild/pyproject.vsprops, but seems to work fine.

See also issue20565.
msg216948 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2014-04-21 15:57
On Mon, Apr 21, 2014, at 8:54, Zachary Ware wrote:
> 
> Zachary Ware added the comment:
> 
> >From some testing, this looks like a Tcl/Tk bug, fixed somewhere between 8.5.9 and 8.5.11: Python 3.2.5 which shipped with Tcl/Tk 8.5.9 shows this bug; Python 3.3.5 which shipped with Tcl/Tk 8.5.11 does not, and Python 2.7 built with Tcl/Tk 8.5.11 doesn't show it.  Tcl/Tk 8.6.1 is also free of the bug.
> 
> Benjamin, what's your take on updating the version of Tcl/Tk shipped with
> the next Python 2.7 Windows installer?  Updating to a newer 8.5 is just a
> matter of changing paths in the buildbot scripts (and making sure whoever
> does the installer since Martin has retired knows about it); updating to
> 8.6 also requires some minor updates to PCbuild/pyproject.vsprops, but
> seems to work fine.

Sounds fine to me.
msg216949 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-04-21 16:38
Any opinions on which version to update to?  8.5.11 is easy and available and fixes the bug; 8.5.15 is the newest 8.5 but not on svn.python.org; 8.6.1 is available and is also what 3.4 (and currently 3.5) ships with.
msg216956 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2014-04-21 18:09
FWIW, ActiveState is shipping 8.5.15 and 8.6.1 in ActiveTcl.  For the OS X installers, we have been using 8.5.x (for the 64-bit/32-bit installer) because that's also what Apple has been shipping in recent OS X versions.  Serhiy has committed a number of fixes in 3.x for Tk 8.6.x; I'm not sure if they are all backported to 2.7.  I'm planning to stick with 8.5.x for OS X for 2.7 at least, and, with the various bugs in the Cocoa (OS X) Tk port, that means the very latest 8.5.15+.
msg216957 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2014-04-21 18:14
On Mon, Apr 21, 2014, at 9:38, Zachary Ware wrote:
> 
> Zachary Ware added the comment:
> 
> Any opinions on which version to update to?  8.5.11 is easy and available
> and fixes the bug; 8.5.15 is the newest 8.5 but not on svn.python.org;
> 8.6.1 is available and is also what 3.4 (and currently 3.5) ships with.

It would probably be good to have similar versions in the mac and
windows installers.
msg217013 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-04-22 15:49
8.5.15 sounds good to me; here's the patch to 2.7 once the 8.5.15 sources are on svn.python.org as tcl-8.5.15.0 and tk-8.5.15.0, no modifications necessary.
msg217018 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-04-22 20:36
New changeset 2b8d9276ad5b by Zachary Ware in branch '2.7':
Issue #21303, #20565: Updated the version of Tcl/Tk used on Windows
http://hg.python.org/cpython/rev/2b8d9276ad5b
msg217022 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-04-22 21:11
Done.  Michael, thanks for the report!
History
Date User Action Args
2022-04-11 14:58:02adminsetgithub: 65502
2014-04-22 21:11:09zach.waresetstatus: open -> closed
messages: + msg217022

assignee: zach.ware
resolution: fixed
stage: resolved
2014-04-22 20:36:48python-devsetnosy: + python-dev
messages: + msg217018
2014-04-22 15:49:37zach.waresetfiles: + issue21303-2.7-tcl-upgrade.diff
keywords: + patch
messages: + msg217013
2014-04-21 18:14:16benjamin.petersonsetmessages: + msg216957
2014-04-21 18:09:32ned.deilysetnosy: + ned.deily
messages: + msg216956
2014-04-21 16:38:23zach.waresetmessages: + msg216949
2014-04-21 15:57:59benjamin.petersonsetmessages: + msg216948
2014-04-21 15:54:10zach.waresetnosy: + benjamin.peterson
messages: + msg216947
2014-04-21 12:46:32mboldiscsetmessages: + msg216942
2014-04-21 12:43:20mboldiscsetmessages: + msg216941
2014-04-18 20:42:39zach.waresetnosy: + gpolo, serhiy.storchaka, zach.ware
messages: + msg216801
2014-04-18 20:32:33mboldiscsettype: behavior
2014-04-18 20:32:13mboldiscsetcomponents: + Tkinter
versions: + Python 2.7
2014-04-18 20:31:42mboldisccreate