python / cpython

The Python programming language
https://www.python.org
Other
63.41k stars 30.37k forks source link

Update tkinter to use Tk 8.6.15 or (better) Tk 9.0 #124111

Open culler opened 1 month ago

culler commented 1 month ago

Feature or enhancement

Proposal:

This issue is being opened as a prerequisite for a PR which will update _tkinter.c and Lib/test/test_tkinter so that they work with both Tk 8.6.15 and Tk 9.0.

Both Tk 8.6.15 and Tk 9.0 currently have release candidates available and will be released soon. The TclTk project has decided that there will be no release of the 8.7 branches. Tcl 9 and Tk 9 are the current development branches (both named main in the fossil repository.)

Tk 9 offers many improvements over Tk 8, and both TclTk and Python would benefit from having tkinter support for Tk 9.0.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

hugovk commented 1 month ago

See also https://github.com/python/cpython/issues/104568.

terryjreedy commented 1 month ago

There are 2 items on that overview issue with individual issues. The first has a solution merged. The second was waiting to know whether there would be an 8.7. "The TclTk project has decided that there will be no release of the 8.7 branches." Do you have a link?

"Tk 9 offers many improvements over Tk 8," Is there a summary page? I am particularly curious if full unicode support was added. If so, I would want 9.0 to at least be an option with our installers, as the lack thereof is the biggest problem with tk for use with IDLE.

culler commented 1 month ago

"The TclTk project has decided that there will be no release of the 8.7 branches." Do you have a link?

Unfortunately, this decision was made by the Tcl Core Team (TCT) by consensus, not by our usual governance process which involves writing and voting on a TIP. (I am a member of the TCT.) You can find a lot of discussion on the Tcl Core list and you can observe that the 8.6.15 and 9.0 versions of Tcl and Tk currently have release candidates, while Tcl and Tk 8.7 have never reached beta. (Maybe I should write such a TIP. I'll consider that.)

"Tk 9 offers many improvements over Tk 8," Is there a summary page?

The Tcl summary is here. Tk 9.0 was created as a continuation of Tk 8.7 (unlike Tcl 9.0, which has signficant differences from 8.7).

I am particularly curious if full unicode support was added. If so, I would want 9.0 to at least be an option with our installers, as the lack thereof is the biggest problem with tk for use with IDLE.

Yes, Tcl 9.0 has full unicode support. That was one of the biggest issues, of course. Switching to 9.0 means no more CESU-8. Moreover, if tkinter starts using Tk 9.0 then, as far as I can tell, that would mean that a majority of Tk users would be using Tk 9.0.

image
serhiy-storchaka commented 1 month ago

I think that this should be split on several parts.

Tcl/Tk 9.0 is a good news, and I look forward to using it.

aivarannamaa commented 1 month ago

It should be backported to 3.13 and 3.12. It is too late for 3.13.0, but it will be included in 3.13.1.

Can it make into 3.12.7 ?

serhiy-storchaka commented 1 month ago

Can it make into 3.12.7 ?

I hope on this, but we still have not updated the bundled version on Windows to 8.6.14 (see #116145).

ahmadkakarr commented 2 days ago

Tcl/Tk 9.0 is available in 3.13 on windows?

terryjreedy commented 1 day ago

No. AFAIK, tk9.0 is still in candidate stage, not officially released. In any case, not in main yet.

culler commented 1 day ago

Terry,

Tk 9.0 has been officially released and is the main branch of the Tk repository. It was released September 26. The Tk repository has a branch named core-9-0-0-rc containing the code used for the release, and the tarball is available in the usual place (https://www.tcl.tk/software/tcltk/download.html).

However, PR #124156 has not been merged into cpython yet.

On Fri, Nov 8, 2024 at 6:52 PM Terry Jan Reedy @.***> wrote:

No. AFAIK, tk9.0 is still in candidate stage, not officially released. In any case, not in main yet.

— Reply to this email directly, view it on GitHub https://github.com/python/cpython/issues/124111#issuecomment-2465951390, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ6CP2RW266GA3VQAYNWGLZ7VMFLAVCNFSM6AAAAABOIEYSFWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRVHE2TCMZZGA . You are receiving this because you authored the thread.Message ID: @.***>

terryjreedy commented 1 day ago

My comment was based on your posts of Sept 16 and early posts on the PR. Thank you for the update. What, then, is stopping 9.0 on main? I could not really tell from the PR. Like Serhiy, I am really looking forward to trying it out.

culler commented 1 day ago

I don't think there is anything stopping it. PR #124156 is in the "awaiting merge" state.

One possible issue is that the Windows port of Tcl 9.0 puts libtommath in a separate DLL, which complicates the Python distribution. But there are build options available which will statically link libtommath into the Tcl DLL. So that issue seems to have a reasonable workaround.