tcl/tk: upgrade from 8.6.12 -> 8.6.14 on Windows#313
Conversation
1ccb82a to
6470105
Compare
This comment was marked as outdated.
This comment was marked as outdated.
|
With 0bd2a31 we're past that and now failing validation checks with I was hoping the first wouldn't be present in 3.12 due to https://github.com/zanieb/python-build-standalone/blob/zb/tcl-tk-8614/cpython-windows/build.py#L560-L567 and we could just make that patch unconditionally — but it fails on 3.12 with the same error so that doesn't appear relevant. The relevant CPython change is at python/cpython#101307 The latter file was added upstream in https://core.tcl-lang.org/tcltls/info/b7b0bd5a8f8b09e4 |
b138eb1 to
97b9448
Compare
|
Most of the macOS builds passing now, one last problem, e.g., for (x86_64-apple-darwin, macos-13, cpython-3.8, pgo): |
|
@indygreg I'm not entirely sure what to do about the zlib situation on Windows. I'll continue to poke at it, but if you have any suggestions I'd appreciate them. I think I'll probably spin up a Windows machine to debug, it's a bit of a struggle via CI. |
| try: | ||
| static_replace_in_file( | ||
| tcltkprops_path, rb"<tclZlibDLLName>zlib1.dll</tclZlibDLLName>", rb"" | ||
| ) | ||
| except NoSearchStringError: | ||
| pass |
There was a problem hiding this comment.
This part is slightly concerning.
Does CPython's build of tcl require a zlib1.dll? If so, removing this reference may mean we're not shipping a zlib1.dll requiring dependency file?
I don't think we have any references to a zlib1.dll in this project. If there is a zlib1.dll dependency here, that would be concerning.
There was a problem hiding this comment.
I don't think this patch (97b9448) actually accomplished anything. I'm just poking around here.
The upstream pull request upgrading the version (python/cpython#101307) says:
I don't see an easy way to avoid having a second copy of zlib specifically for Tcl, so I guess we just have to include it, but I'm pretty sure that's all handled here.
I'm not sure how to make sure this is linked to our zlib. Or if we can just exclude it entirely somehow? The Windows distribution validation is failing with with:
error: python/install/DLLs/tcl86t.dll loads illegal library zlib1.dll
794ff65 to
c349f9b
Compare
Let's stay modern. Should address astral-sh#296.
This reverts commit 97b9448.
c349f9b to
c9b3f8a
Compare
c9b3f8a to
a48868d
Compare
There was a problem hiding this comment.
The project files for _tkinter prior to CPython 3.12 do not include the zlib DLL as an output. This results in this file not being included in the distribution, breaking _tkinter.
Additionally the logic around lines 665 of cpython-windows/build.py removes this file from 3.12 and 3.13 distributions:
# Python 3.12+ uses the the pre-built tk-windows-bin 8.6.12 which doesn't
# have a standalone zlib DLL, so we remove references to it. For Python
# 3.14+, we're using tk-windows-bin 8.6.14 which includes a prebuilt zlib
# DLL, so we skip this patch there.
# On arm64, we use the new version of tk-windows-bin for all versions.
if meets_python_minimum_version(python_version, "3.12") and (
meets_python_maximum_version(python_version, "3.13") or arch == "arm64"
):
try:
static_replace_in_file(
pcbuild_path / "_tkinter.vcxproj",
rb'<_TclTkDLL Include="$(tcltkdir)\bin\$(tclZlibDllName)" />',
rb"",
)
except NoSearchStringError:
passThis file will need to be added to the distribution, either manually or by patching the project files.
Attempt to work through some of the failures in #303
from python/cpython#99834 (comment)