]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.15] gh-124111: Update Windows build to use Tcl/Tk 9.0.3 (GH-149842)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 14 May 2026 18:49:29 +0000 (20:49 +0200)
committerGitHub <noreply@github.com>
Thu, 14 May 2026 18:49:29 +0000 (13:49 -0500)
(cherry picked from commit c62c3710dc795a60c3c3dc8e2aeeeb16c06da197)

Co-authored-by: Zachary Ware <zach@python.org>
Lib/test/test_tcl.py
Misc/NEWS.d/next/Windows/2026-05-06-21-36-53.gh-issue-124111.m4OBX8.rst [new file with mode: 0644]
Misc/externals.spdx.json
PCbuild/get_externals.bat
PCbuild/readme.txt
PCbuild/tcltk.props
Tools/msi/tcltk/tcltk_files.wxs
Tools/msi/testrelease.bat

index 47450d3fd5976fafb032f5db4bee04365f3632e6..81a5477b496b5c21e994e96b0a3b0ebf5010241e 100644 (file)
@@ -54,7 +54,11 @@ class TclTest(unittest.TestCase):
 
     def test_eval_surrogates_in_result(self):
         tcl = self.interp
-        self.assertEqual(tcl.eval(r'set a "<\ud83d\udcbb>"'), '<\U0001f4bb>')
+        result = tcl.eval(r'set a "<\ud83d\udcbb>"')
+        if sys.platform == 'win32':
+            self.assertEqual('<\ud83d\udcbb>', result)
+        else:
+            self.assertEqual('<\U0001f4bb>', result)
 
     def testEvalException(self):
         tcl = self.interp
@@ -289,7 +293,11 @@ class TclTest(unittest.TestCase):
             set b "<\\ud83d\\udcbb>"
             """)
         tcl.evalfile(filename)
-        self.assertEqual(tcl.eval('set b'), '<\U0001f4bb>')
+        result = tcl.eval('set b')
+        if sys.platform == 'win32':
+            self.assertEqual('<\ud83d\udcbb>', result)
+        else:
+            self.assertEqual('<\U0001f4bb>', result)
 
     def testEvalFileException(self):
         tcl = self.interp
diff --git a/Misc/NEWS.d/next/Windows/2026-05-06-21-36-53.gh-issue-124111.m4OBX8.rst b/Misc/NEWS.d/next/Windows/2026-05-06-21-36-53.gh-issue-124111.m4OBX8.rst
new file mode 100644 (file)
index 0000000..9a57536
--- /dev/null
@@ -0,0 +1 @@
+Updated Windows builds to use Tcl/Tk 9.0.3.
index 593fa01bf25ed1e8fc7d85e4c8818235214594c6..9a571fba732ab4a7b753e8e6230b4e8bc61f4a9b 100644 (file)
       "versionInfo": "3.50.4.0"
     },
     {
-      "SPDXID": "SPDXRef-PACKAGE-tcl-core",
+      "SPDXID": "SPDXRef-PACKAGE-tcl",
       "checksums": [
         {
           "algorithm": "SHA256",
-          "checksumValue": "4c23f0dd3efcbe6f3a22c503a68d147617bb30c4f5290f1eb3eaacf0b460440b"
+          "checksumValue": "7a1d1f3a2b8f4484a9c2a027a157963c18f85a81785e85fcb5d1e3df6b6a4fd4"
         }
       ],
-      "downloadLocation": "https://github.com/python/cpython-source-deps/archive/refs/tags/tcl-core-8.6.15.0.tar.gz",
+      "downloadLocation": "https://github.com/python/cpython-source-deps/archive/refs/tags/tcl-9.0.3.0.tar.gz",
       "externalRefs": [
         {
           "referenceCategory": "SECURITY",
-          "referenceLocator": "cpe:2.3:a:tcl_tk:tcl_tk:8.6.15.0:*:*:*:*:*:*:*",
+          "referenceLocator": "cpe:2.3:a:tcl_tk:tcl_tk:9.0.3.0:*:*:*:*:*:*:*",
           "referenceType": "cpe23Type"
         }
       ],
       "licenseConcluded": "NOASSERTION",
-      "name": "tcl-core",
+      "name": "tcl",
       "primaryPackagePurpose": "SOURCE",
-      "versionInfo": "8.6.15.0"
+      "versionInfo": "9.0.3.0"
     },
     {
       "SPDXID": "SPDXRef-PACKAGE-tk",
       "checksums": [
         {
           "algorithm": "SHA256",
-          "checksumValue": "0ae56d39bca92865f338529557a1e56d110594184b6dc5a91339c5675751e264"
+          "checksumValue": "54fb59df12c489c6264f5b7d3d7444b150d1e3d6561fd59cdb11483440cec000"
         }
       ],
-      "downloadLocation": "https://github.com/python/cpython-source-deps/archive/refs/tags/tk-8.6.15.0.tar.gz",
+      "downloadLocation": "https://github.com/python/cpython-source-deps/archive/refs/tags/tk-9.0.3.1.tar.gz",
       "externalRefs": [
         {
           "referenceCategory": "SECURITY",
-          "referenceLocator": "cpe:2.3:a:tcl_tk:tcl_tk:8.6.15.0:*:*:*:*:*:*:*",
+          "referenceLocator": "cpe:2.3:a:tcl_tk:tcl_tk:9.0.3.1:*:*:*:*:*:*:*",
           "referenceType": "cpe23Type"
         }
       ],
       "licenseConcluded": "NOASSERTION",
       "name": "tk",
       "primaryPackagePurpose": "SOURCE",
-      "versionInfo": "8.6.15.0"
+      "versionInfo": "9.0.3.1"
     },
     {
       "SPDXID": "SPDXRef-PACKAGE-xz",
index 405285b65dd270aeab3486b21e2d1e2b627b23ba..368bc489bfa9680cbbcb768413f156fd98524070 100644 (file)
@@ -57,8 +57,8 @@ if NOT "%IncludeLibffiSrc%"=="false" set libraries=%libraries%  libffi-3.4.4
 if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries%     openssl-3.5.6
 set libraries=%libraries%                                       mpdecimal-4.0.0
 set libraries=%libraries%                                       sqlite-3.50.4.0
-if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.15.0
-if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-8.6.15.0
+if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-9.0.3.0
+if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-9.0.3.1
 set libraries=%libraries%                                       xz-5.8.1.1
 set libraries=%libraries%                                       zlib-ng-2.2.4
 set libraries=%libraries%                                       zstd-1.5.7
@@ -80,7 +80,7 @@ echo.Fetching external binaries...
 set binaries=
 if NOT "%IncludeLibffi%"=="false"  set binaries=%binaries% libffi-3.4.4
 if NOT "%IncludeSSL%"=="false"     set binaries=%binaries% openssl-bin-3.5.6
-if NOT "%IncludeTkinter%"=="false" set binaries=%binaries% tcltk-8.6.15.0
+if NOT "%IncludeTkinter%"=="false" set binaries=%binaries% tcltk-9.0.3.0
 if NOT "%IncludeSSLSrc%"=="false"  set binaries=%binaries% nasm-2.11.06
 if NOT "%IncludeLLVM%"=="false"    set binaries=%binaries% llvm-21.1.4.0
 
index 14aac0b0dc84b67914d3a7c66c704f18a013a12e..6aecbfff182dcb4ab472df789fcbec2773a1f733 100644 (file)
@@ -247,7 +247,7 @@ _sqlite3
         https://www.sqlite.org/
 
 _tkinter
-    Wraps version 8.6.15 of the Tk windowing system, which is downloaded
+    Wraps version 9.0.3 of the Tk windowing system, which is downloaded
     from our binaries repository at
     https://github.com/python/cpython-bin-deps.
 
index a1da1155b881fd70f3f19b750c405f6f964a05dd..28e8c0db4d1eafd0122ef212aab3cfa2610bc6da 100644 (file)
@@ -2,7 +2,7 @@
 <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <Import Project="pyproject.props" Condition="$(__PyProject_Props_Imported) != 'true'" />
   <PropertyGroup>
-    <TclVersion Condition="$(TclVersion) == ''">8.6.15.0</TclVersion>
+    <TclVersion Condition="$(TclVersion) == ''">9.0.3.0</TclVersion>
     <TkVersion Condition="$(TkVersion) == ''">$(TclVersion)</TkVersion>
     <TclMajorVersion>$([System.Version]::Parse($(TclVersion)).Major)</TclMajorVersion>
     <TclMinorVersion>$([System.Version]::Parse($(TclVersion)).Minor)</TclMinorVersion>
@@ -12,7 +12,9 @@
     <TkMinorVersion>$([System.Version]::Parse($(TkVersion)).Minor)</TkMinorVersion>
     <TkPatchLevel>$([System.Version]::Parse($(TkVersion)).Build)</TkPatchLevel>
     <TkRevision>$([System.Version]::Parse($(TkVersion)).Revision)</TkRevision>
-    <tclDir Condition="$(tclDir) == ''">$(ExternalsDir)tcl-core-$(TclVersion)\</tclDir>
+    <!-- Back compat hack.  If you're here wondering about -core vs not, do us both a favor and just override the whole tclDir variable -->
+    <tclDir Condition="$(tclDir) == '' and $(TclMajorVersion) == '8'">$(ExternalsDir)tcl-core-$(TclVersion)\</tclDir>
+    <tclDir Condition="$(tclDir) == ''">$(ExternalsDir)tcl-$(TclVersion)\</tclDir>
     <tkDir Condition="$(tkDir) == ''">$(ExternalsDir)tk-$(TkVersion)\</tkDir>
     <tcltkDir Condition="$(tcltkDir) == ''">$(ExternalsDir)tcltk-$(TclVersion)\$(ArchName)\</tcltkDir>
     <tcltkSuffix Condition="'$(TclMajorVersion)' == '8'">t</tcltkSuffix>
index 5dad7c98d4f048a37d5d9a436c19c2d1d569cd25..7c7784741d9178d8ecfcec4fc1b62ff9406ef0ed 100644 (file)
             <Component Id="_tkinter.lib" Directory="libs" Guid="*">
                 <File Name="_tkinter.lib" KeyPath="yes" />
             </Component>
-            <Component Id="tcl86t.dll" Directory="DLLs" Guid="*">
-                <File Name="tcl86t.dll" KeyPath="yes" />
+            <Component Id="tcl90.dll" Directory="DLLs" Guid="*">
+                <File Name="tcl90.dll" KeyPath="yes" />
             </Component>
-            <Component Id="tk86t.dll" Directory="DLLs" Guid="*">
-                <File Name="tk86t.dll" KeyPath="yes" />
+            <Component Id="tcl9tk90.dll" Directory="DLLs" Guid="*">
+                <File Name="tcl9tk90.dll" KeyPath="yes" />
+            </Component>
+            <Component Id="libtommath.dll" Directory="DLLs" Guid="*">
+                <File Name="libtommath.dll" KeyPath="yes" />
             </Component>
             <Component Id="zlib1.dll" Directory="DLLs" Guid="*">
                 <File Name="zlib1.dll" KeyPath="yes" />
index 02bcca943cf79b46e1cb5312d910fe59fae86c6c..db98f690151196cf327ee2c58a3552ca860773d5 100644 (file)
@@ -88,9 +88,7 @@ exit /B 0
 )
 @if not errorlevel 1 (
     @echo Testing Tcl/tk
-    @set TCL_LIBRARY=%~2\Python\tcl\tcl8.6
     "%~2\Python\python.exe" -m test -uall -v test_ttk_guionly test_tk test_idle > "%~2\tcltk.txt" 2>&1
-    @set TCL_LIBRARY=
 )
 
 @set EXITCODE=%ERRORLEVEL%