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: Drop support of Tcl/Tk older than 8.5.12
Type: enhancement Stage: resolved
Components: Library (Lib), Tests, Tkinter Versions: Python 3.11
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: epaine, erlendaasland, ronaldoussoren, serhiy.storchaka, terry.reedy
Priority: normal Keywords: patch

Created on 2022-03-12 16:03 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 31839 merged serhiy.storchaka, 2022-03-12 16:10
PR 31962 merged serhiy.storchaka, 2022-03-17 16:32
Messages (9)
msg414999 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2022-03-12 16:03
In issue45979 E. Paine suggested to drop support of Tcl/Tk older than 8.5.12 (8.5.12 was released on 2012-07-27 and 8.6.0 on 2012-12-20). Tkinter tests contain workarounds and special cases for older versions of Tcl/Tk, many of them can be removed. Also some Python and C code of tkinter can be simplified.
msg415394 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2022-03-17 08:27
One consideration is support for older LTS distributions of Linux, RHEL/Centos 7 appears to ship with Tcl/Tk 8.5. 

The system install of Tcl/Tk on macOS is also 8.5, but that variant has too many bugs to try to support it.
msg415395 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2022-03-17 08:43
8.5.12 will be 10 years old at the time of releasing 3.11.

We can relax the requirements for 8.5.x, so the code can be build with older versions, but some tests will fail because we removed workarounds for differences in behavior in older versions from tests.

The LTS distributions can also provide their own patches which relax the requirements.
msg415397 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2022-03-17 11:06
New changeset c2e3c06139e9468efb32629d147d99a1672d9e19 by Serhiy Storchaka in branch 'main':
bpo-46996: Remove support of Tcl/Tk < 8.5.12 (GH-31839)
msg415420 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2022-03-17 15:59
Ronald: According to a page (which I cannot find, E. Paine should know) Centos 7 has the oldest tcl among current *nix distributions.
says it is 8.5.13, which is what I remember from the comparison page.

Serhiy: IDLE has required TkVersion >= 8.5 for some years (currently top of  Does the _tkinter.c line
  #error "Tk older than 8.5.12 not supported"
translate into an ImportError (which is already caught).  I never worried about someone trying to import 8.3 or before, but Apple's 8.5.9 is possible.

Is there any reason that IDLE might someday require 8.6 before tkinter does?
msg415423 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2022-03-17 16:17
After PR 31839 has been merged you cannot build the _tkinter module with Tcl/Tk older than 8.5.12. If you will still try to run IDLE on such incomplete build, an import error during importing tkinter will be translated to IDLE error:

$ ./python -m idlelib
** IDLE can't import Tkinter.
Your Python may not be configured for Tk. **

IDLE might someday require 8.6 if it start using some 8.6 features non-optionally.
msg415434 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2022-03-17 17:32
tk release availability is a bit confusing.
appears to lists things 'new' in 3.6.1, but that seems to mean new since 8.5.1, as it includes thing introduced in 8.5.n, where n > 1. For instance, ttk spinbox is listed in this doc, but was available in 8.5.9, so is in 8.5.12+ and can be used without an 8.6 requirement.

the 8.5.19 doc for the widget, shows the 'new in 8.6' treeview tag commands.  I suspect that they were present in 8.5.13.  Is there a specific 8.5.12 doc available?  I searched and tried adding '.12' in the url above and both failed.  Buildbots without _tkinter don't help either.
msg415472 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2022-03-18 07:30
Terry: tkinter on macOS already effectively does not support Tk 8.5, or basically anything bug the latest 8.6.x release. That's because older versions have too many bugs that affect Python users, which mostly show up on our tracker as bug reports about IDLE.

Because of this we generally close issues that mention using tkinter with 8.5 on macOS unless the problem can be reproduced using 8.6 as well (using the installer on
msg415555 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2022-03-19 15:14
New changeset 383a3bec74f0bf0c1b1bef9e0048db389c618452 by Serhiy Storchaka in branch 'main':
bpo-46996: IDLE: Drop workarounds for old Tk versions (GH-31962)
Date User Action Args
2022-04-11 14:59:57adminsetgithub: 91152
2022-03-19 15:14:25serhiy.storchakasetmessages: + msg415555
2022-03-18 07:30:21ronaldoussorensetmessages: + msg415472
2022-03-17 17:33:03christian.heimessetnosy: - christian.heimes
2022-03-17 17:32:23terry.reedysetstatus: open -> closed

messages: + msg415434
2022-03-17 16:56:39serhiy.storchakasetstatus: closed -> open
2022-03-17 16:32:21serhiy.storchakasetpull_requests: + pull_request30051
2022-03-17 16:17:04serhiy.storchakasetmessages: + msg415423
2022-03-17 15:59:00terry.reedysetnosy: + terry.reedy
messages: + msg415420
2022-03-17 11:06:28serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2022-03-17 11:06:10serhiy.storchakasetmessages: + msg415397
2022-03-17 08:43:22serhiy.storchakasetmessages: + msg415395
2022-03-17 08:27:49ronaldoussorensetnosy: + ronaldoussoren
messages: + msg415394
2022-03-15 07:58:51serhiy.storchakasetnosy: + christian.heimes, erlendaasland, epaine
components: + Tkinter
2022-03-12 16:10:37serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request29938
2022-03-12 16:03:38serhiy.storchakacreate