Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider upgrading bundled Tk to 8.6.13 #99834

Closed
aivarannamaa opened this issue Nov 28, 2022 · 12 comments
Closed

Consider upgrading bundled Tk to 8.6.13 #99834

aivarannamaa opened this issue Nov 28, 2022 · 12 comments
Assignees
Labels
3.12 bugs and security fixes OS-mac OS-windows stdlib Python modules in the Lib dir topic-tkinter type-feature A feature request or enhancement

Comments

@aivarannamaa
Copy link
Contributor

aivarannamaa commented Nov 28, 2022

Tcl/Tk 8.6.13 with many bugfixes was released a week ago. I think it's worth trying it out in the next Python 3.12 alphas and betas.

Linked PRs

@aivarannamaa aivarannamaa added the type-feature A feature request or enhancement label Nov 28, 2022
@hugovk hugovk added stdlib Python modules in the Lib dir topic-tkinter 3.12 bugs and security fixes labels Nov 28, 2022
@zooba
Copy link
Member

zooba commented Nov 28, 2022

I've pushed builds of 8.6.13 to our deps repositories, so anyone can update the references now.

It seems we have to bring a copy of zlib as a DLL now, so the installers will need an update. I'm also a little bit concerned about it interfering with other modules, but there doesn't seem to be an easy way to statically link it anymore, so I guess we'll just have to deal with any fallout if it breaks stuff.

@aivarannamaa
Copy link
Contributor Author

According to my tests the bundled 8.6.13 works nicely on Windows.

Now I am eagerly waiting for the update in the macOS installer.

@ned-deily
Copy link
Member

It seems that 8.6.13 has been shown to solve some problems seen on macOS as in #110218 so let's backport this to 3.11 as well; next release is 3.11.7.

@gernophil
Copy link

I have the same issue for python 3.9 would it also be an option to update this installer?

@ned-deily
Copy link
Member

Sorry but our release policy has long been that we do not produce binary installers (for Windows or macOS) once a release reaches the "security-fix-only" phase of its life cycle which happened in 2022-05 for Python 3.9.

@gernophil
Copy link

Damn, so is there any option to solve this issue for Python 3.9?

@ned-deily
Copy link
Member

If you can't upgrade to a branch currently in a full bugfix support phase by the CPython project (3.11.x or 3.12.x), a Python 3.9.x bundled with a newer Tcl/Tk might be available from a third-party distributor depending on what platform you need.

@aivarannamaa
Copy link
Contributor Author

@gernophil, if you want to upgrade Tk in Python 3.9 you are bundling with your app, then you may be able to simply copy Tcl/Tk files over from your Python 3.12 installation. I haven't tried this with 3.9, but I successfully used this approach for upgrading older Tk in Python 3.10.

@gernophil
Copy link

Thanks for that. I'll try that. What files exactly would that be? Did you also use PyInstaller? Any chance, I can integrate this in the freezing process or already copy it to a venv?

@aivarannamaa
Copy link
Contributor Author

Thanks for that. I'll try that. What files exactly would that be? Did you also use PyInstaller? Any chance, I can integrate this in the freezing process or already copy it to a venv?

I didn't write down the list of files and I'm not using this trick anymore after moving to Python 3.12. I only remember that in Windows, Tcl/Tk gained a new dll between 3.10 and 3.12 which had to be copied over. In macOS (and possibly also in Windows) I also had to update some paths in tkConfig.sh and tclConfig.sh.

I suggest you try to update your existing Python installation and test it by launching IDLE and noting the Tk version in IDLE's About box. This way PyInstaller will pick up the updated Tcl/Tk as well and you don't have to do any post-processing.

Repeating my warning, though -- while it worked for my app and Python 3.10, this is no proof that it will work for your app and Python 3.9 (for example _tkinter module may have been changed after 3.9 to match newer Tk). It's worth trying, though, if you are unable to upgrade to Python 3.12 directly.

@gernophil
Copy link

gernophil commented Oct 19, 2023

OK, I just tested my application and it seems to work fine using 3.11 (I need torchaudio 2.0.2, which is incompatible to 3.12. torchaudio 3.1.0 has a bug that should be fixed in the next release). So, Now I have to wait for an update for the 3.11 installer or torchaudio :). Let's see who's faster. Any idea, when the 3.11 update will be released?

@chrstphrchvz
Copy link
Contributor

Any idea, when the 3.11 update will be released?

https://peps.python.org/pep-0664/#bugfix-releases
3.11.7 is scheduled for 2023-12-04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes OS-mac OS-windows stdlib Python modules in the Lib dir topic-tkinter type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

7 participants