python / cpython

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

Update installers to Tcl/Tk 8.6.14 #116145

Open chrstphrchvz opened 6 months ago

chrstphrchvz commented 6 months ago

Tcl/Tk 8.6.14 is out today: https://sourceforge.net/p/tcl/mailman/tcl-core/thread/SA1PR09MB887585E09B30AE57F0E7F2E3865F2%40SA1PR09MB8875.namprd09.prod.outlook.com/#msg58743251

I will open a few PRs for these shortly: one here for the macOS installer, and others at cpython-source-deps for Windows: https://github.com/python/cpython-source-deps/pull/33 https://github.com/python/cpython-source-deps/pull/34

There is still a known test failure with Tk 8.6.14 which I have neglected: gh-107262

Linked PRs

hugovk commented 5 months ago

The linked PR is merged, is there more to do or can this issue be closed? Thanks!

ned-deily commented 5 months ago

The linked PR is merged, is there more to do or can this issue be closed? Thanks!

I believe the Windows build needs to be updated to use the new version (PCbuild/get_externals.bat and PCbuild/tcltk.props). @zooba @zware

zooba commented 5 months ago

Yeah, Windows is not done yet. I should have time later today to bring in the new sources and set the build up.

zooba commented 5 months ago

It looks like something has changed in Tkinter as a result of the new version. @terryjreedy is this something you can look into? You can see the build results on #117030

terryjreedy commented 2 months ago

@zooba I have no record or recollection of receiving your Mar 20 note. I just read the release announcement and don't see any problem at least with IDLE. I will do some manual testing after updating. Glad to see update in both 3.13 and 3.14. Fine to leave 3.12 alone.

serhiy-storchaka commented 2 months ago

8.6.14 is a bugfix release, and it can contain changes affecting Tkinter users. https://wiki.tcl-lang.org/page/Changes+in+Tcl%2FTk+8%2E6%2E14

Is there a way for Windows and macOS users to update Tcl/Tk separately? If they can only use the version shipped with Python, we should provide the last stable bugfix release.

ned-deily commented 2 months ago

If they can only use the version shipped with Python, we should provide the last stable bugfix release.

Thanks for the reminder, @serhiy-storchaka. This should have been backported earlier to 3.12.x for the macOS installer but I guess I was waiting to see if any issues arose with the 3.13 alphas. PR #119922 will be merged for the upcoming 3.12.4 release.

aivarannamaa commented 2 months ago

The discussion under PR-s is confusing for me, so I'll ask here -- is Tcl/Tk 8.6.14 coming for Python 3.12 Windows installers? 3.12.4 seems to be still with 8.6.13.

marcelotduarte commented 3 weeks ago

There is an error in tkinter.Tk()

$ python
Python 3.13.0rc1 (tags/v3.13.0rc1:e4a3e78, Jul 31 2024, 20:58:38) [MSC v.1940 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
>>> tkinter.TkVersion
8.6
>>> tkinter.TclVersion
8.6
>>> tkinter.Tk()
Traceback (most recent call last):
  File "<python-input-7>", line 1, in <module>
    tkinter.Tk()
    ~~~~~~~~~~^^
  File "C:\Python313-64\Lib\tkinter\__init__.py", line 2459, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
              ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
    C:/Python313-64/lib/tcl8.6 C:/lib/tcl8.6 C:/lib/tcl8.6 C:/library C:/library C:/tcl8.6.14/library C:/tcl8.6.14/library

This probably means that Tcl wasn't installed properly.

The correct path to search is C:/Python313-64/tcl/tcl8.6. In python 3.12.4 is C:/Python312-64/tcl/tcl8.6 also.

terryjreedy commented 3 weeks ago

Same binary, some Python commands, Win10, works fine for me.

>>> import tkinter
>>> tkinter.Tk()
<tkinter.Tk object .>

No idea why the difference.

terryjreedy commented 3 weeks ago

IDLE works normally and reports 8.6.14, as expected.

marcelotduarte commented 3 weeks ago

I experienced this error using GHA for testing cx_Freeze. So I installed it in a VM with W11 to test. The difference may be that I didn't install python for all users, like GH. The error in GHA:

File "C:\Users\runneradmin\.local\venv\cxfreeze_tkinter_win-amd64_313\Lib\site-packages\cx_Freeze\hooks\tkinter.py", line 35, in load_tkinter
      root = tkinter.Tk(useTk=False)
    File "C:\hostedtoolcache\windows\Python\3.13.0-rc.1\x64\Lib\tkinter\__init__.py", line 2459, in __init__
      self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
                ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  _tkinter.TclError: Can't find a usable init.tcl in the following directories: 
      C:/hostedtoolcache/windows/Python/3.13.0-rc.1/x64/lib/tcl8.6 C:/hostedtoolcache/windows/Python/3.13.0-rc.1/lib/tcl8.6 C:/hostedtoolcache/windows/Python/lib/tcl8.6 C:/hostedtoolcache/windows/Python/3.13.0-rc.1/library C:/hostedtoolcache/windows/Python/library C:/hostedtoolcache/windows/Python/tcl8.6.14/library C:/hostedtoolcache/windows/tcl8.6.14/library

  This probably means that Tcl wasn't installed properly.