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.

Title: Update Windows 2.7 build to Tcl/Tk 8.5.19
Type: Stage: resolved
Components: Tkinter, Windows Versions: Python 2.7
Status: closed Resolution: out of date
Dependencies: Superseder: [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5
View: 30855
Assigned To: Nosy List: benjamin.peterson, kumba, larry, ned.deily, paul.moore, python-dev, serhiy.storchaka, steve.dower, terry.reedy, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2016-07-28 20:19 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

File name Uploaded Description Edit
update-tk-2.7.patch serhiy.storchaka, 2016-12-03 09:57 review
Messages (18)
msg271581 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-07-28 20:19
Current Tcl/Tk version in Windows build is Tcl/Tk 8.6.6 was released yesterday.
msg271585 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2016-07-28 21:13
I've done a test build (32-bit Release) and everything went fine.  It looks like we get to drop our patches, which is enough for me to want to do this for 3.6.

We historically haven't kept our Tcl/Tk sources extremely up to date on Windows, though; is there anything compelling in 8.6.[56] to warrant updating for 3.5?
msg271589 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-07-28 23:57
New changeset abfda075eb37 by Zachary Ware in branch 'default':
Issue #27647: Update Windows build to Tcl/Tk 8.6.6
msg271590 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2016-07-29 00:29
There have also been a few updates to 8.5 since we last updated the version we ship with 2.7; has there been anything in 8.5.15-19 that we should pick up?
msg271598 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2016-07-29 03:46
I think 3.4 and 3.5 were pretty current as of .0 release, or certainly as of .0b1.  Have we updated to new unicode (9.0), like tcl?  Martin used to do that.
msg281813 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-11-27 09:44
Larry, Benjamin, what do you think about updating the version of Tcl/Tk shipped with 3.5 and 2.7 on Windows?

Tcl/Tk 8.6.6 Jul 27, 2016
Tcl/Tk 8.5.19 Feb 12, 2016

Currently used releases:

In 3.5:
In 2.7:
msg282064 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2016-11-30 07:46
Doesn't seem terribly urgent, so maybe not 2.7.13.
msg282065 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-11-30 08:01
Why not? 8.5.15 is 3 years old. There were 4 bugfix releases since it.
msg282139 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2016-12-01 07:40
I don't mind if it gets updated.

On Wed, Nov 30, 2016, at 00:01, Serhiy Storchaka wrote:
> Serhiy Storchaka added the comment:
> Why not? 8.5.15 is 3 years old. There were 4 bugfix releases since it.
> ----------
> _______________________________________
> Python tracker <>
> <>
> _______________________________________
msg282277 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-12-03 09:57
Proposed patch updates Tcl/Tk versions to 8.5.19 and Tix version to in Python 2.7 on Windows and Mac OS X. But needed to update . Is there special script or instruction?
msg282289 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2016-12-03 17:04
Please don't change Mac/BuildScript.  The code there to build Tcl and Tk is currently not used.
msg286554 - (view) Author: Joshua Kinard (kumba) Date: 2017-01-31 22:10

I came across a StackOverflow question that apparently turned up a bug in Tk itself with regards to Spinboxes on Windows Aero themes.  The question is here:

And I did a deep-dive of the issue here as the accepted answer:

This led to someone from Tk noticing, and they patched the bug in Tk upstream in this commit:

I do not know if that commit is in a current Tk release (doubtful).  Could you guys look at picking it up for the next Python 2.7/3.x release?  It only affects Windows platforms using Aero.  Classic mode spinboxes or other Tk themes (e.g., clam) are unaffected.

It'd also be awesome if Tk-8.6 could go into the next Python 2.7 release under Windows.  That has PNG support for Tk's PhotoImage class, which would make working with icons and transparency a *lot* easier.
msg286558 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-01-31 22:29
Changing tk in 2.7.z from 8.5 to 8.6 would add new features, which we don't usually do in bugfix releases.
msg286559 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2017-01-31 22:29
I don't think we should update it in 3.5.  That sounds destabilizing.
msg286569 - (view) Author: Joshua Kinard (kumba) Date: 2017-02-01 00:13
@Terry: This only applies on the Windows release of Python.  On both Linux and FreeBSD, you can wind up with Python 2.7 and Tk-8.6.x by default in some instances:

# pkg info | grep python27
python27-2.7.13_1              Interpreted object-oriented programming language
# pkg info | grep tk86
tk86-8.6.6                     Graphical toolkit for Tcl

That's a FreeBSD-11.0-RELEASE install on a laptop.

Is there guidance anywhere on which Tk version a given Python version prefers to be used with?  E.g., is Python 2.7 only supported against Tk-8.5.x, leaving 8.6.x users on their own?
msg286613 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-02-01 11:05
AFAIK, the Windows x.y compiled release and installer is normally updated to the latest stable tcl/tk, about the time of beta 1, and never changed for bugfix releases.  2.7 was an exception because of its long life and because later 8.5.z releases has some critical bugfixes, such as working with European keyboards.

I believe the current OSX binary compiles _tkinter against tcl/tk 8.5, and we recommend replacing the Apple's old 8.5 with the latest 8.5 from ActiveState, and that people who instead install ActiveState 8.6 have to make or obtain a new Python binary that compiles _tkinter for 8.6. (Prior to Py3.6, there was also a Mac release for older Macs, and it was compiled for tcl/tk 8.4.)

We don't compile Python on *nix and there are multiple versions of tcl/tk in use.  I would prefer to have the latest tcl/tk at least for bugfixes, and a Python binary that can use if, even if tkinter does not give access to the latest tk features.
msg286614 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-02-01 11:19
I changed title to match what might and, I think, should happen.

My take: x.y is normally followed within 2 years by x.(y+1), which on Windows includes the latest tcl/tk.  So, on Windows, anyone who wants the new tcl/tk can upgrade to the newer Python.  For 2.7, there will be no 2.8 with newer tcl/tk.  So we updated tcl/tk once already within 2.7 and it seems time to do so again.  If there are more 8.5 bugfixes before the last 2.7 release in 2020, we should do so a third time.
msg286682 - (view) Author: Joshua Kinard (kumba) Date: 2017-02-01 19:37
Fair enough.  I am stuck working with 2.7 for quite a while longer due to platform constraints, but hopefully can migrate over to 3.x at some point.  Was worth asking :)

At least try to cherrypick that one commit from the TCL/Tk source I referenced so that the Spinbox works correctly under Vista/Aero.  I am not sure when that might wind up in a future Tk release.
Date User Action Args
2022-04-11 14:58:34adminsetgithub: 71834
2019-11-18 06:47:35zach.waresetstatus: open -> closed
superseder: [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5
resolution: out of date
stage: needs patch -> resolved
2017-02-01 19:37:09kumbasetmessages: + msg286682
2017-02-01 11:19:58terry.reedysetversions: - Python 3.5
2017-02-01 11:19:35terry.reedysetmessages: + msg286614
title: Update Windows build to Tcl/Tk 8.6.6 -> Update Windows 2.7 build to Tcl/Tk 8.5.19
2017-02-01 11:05:13terry.reedysetmessages: + msg286613
2017-02-01 00:13:13kumbasetmessages: + msg286569
2017-01-31 22:29:54larrysetmessages: + msg286559
2017-01-31 22:29:16terry.reedysetmessages: + msg286558
2017-01-31 22:10:33kumbasetnosy: + kumba
messages: + msg286554
2016-12-03 17:04:39ned.deilysetnosy: + ned.deily
messages: + msg282289
2016-12-03 09:57:57serhiy.storchakasetfiles: + update-tk-2.7.patch
keywords: + patch
messages: + msg282277
2016-12-01 07:40:13benjamin.petersonsetmessages: + msg282139
2016-11-30 08:01:34serhiy.storchakasetmessages: + msg282065
2016-11-30 07:46:21benjamin.petersonsetmessages: + msg282064
2016-11-27 09:44:46serhiy.storchakasetnosy: + larry, benjamin.peterson
messages: + msg281813
2016-07-29 03:46:09terry.reedysetmessages: + msg271598
2016-07-29 00:29:40zach.waresetmessages: + msg271590
versions: + Python 2.7, - Python 3.6
2016-07-28 23:57:56python-devsetnosy: + python-dev
messages: + msg271589
2016-07-28 21:13:02zach.waresetmessages: + msg271585
2016-07-28 20:20:55serhiy.storchakasetnosy: + terry.reedy
2016-07-28 20:19:54serhiy.storchakacreate