Skip to content

Commit c62c371

Browse files
authored
gh-124111: Update Windows build to use Tcl/Tk 9.0.3 (GH-149477)
1 parent c375292 commit c62c371

8 files changed

Lines changed: 36 additions & 24 deletions

File tree

Lib/test/test_tcl.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ def test_eval_null_in_result(self):
5454

5555
def test_eval_surrogates_in_result(self):
5656
tcl = self.interp
57-
self.assertEqual(tcl.eval(r'set a "<\ud83d\udcbb>"'), '<\U0001f4bb>')
57+
result = tcl.eval(r'set a "<\ud83d\udcbb>"')
58+
if sys.platform == 'win32':
59+
self.assertEqual('<\ud83d\udcbb>', result)
60+
else:
61+
self.assertEqual('<\U0001f4bb>', result)
5862

5963
def testEvalException(self):
6064
tcl = self.interp
@@ -289,7 +293,11 @@ def test_evalfile_surrogates_in_result(self):
289293
set b "<\\ud83d\\udcbb>"
290294
""")
291295
tcl.evalfile(filename)
292-
self.assertEqual(tcl.eval('set b'), '<\U0001f4bb>')
296+
result = tcl.eval('set b')
297+
if sys.platform == 'win32':
298+
self.assertEqual('<\ud83d\udcbb>', result)
299+
else:
300+
self.assertEqual('<\U0001f4bb>', result)
293301

294302
def testEvalFileException(self):
295303
tcl = self.interp
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Updated Windows builds to use Tcl/Tk 9.0.3.

Misc/externals.spdx.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,46 +108,46 @@
108108
"versionInfo": "3.50.4.0"
109109
},
110110
{
111-
"SPDXID": "SPDXRef-PACKAGE-tcl-core",
111+
"SPDXID": "SPDXRef-PACKAGE-tcl",
112112
"checksums": [
113113
{
114114
"algorithm": "SHA256",
115-
"checksumValue": "4c23f0dd3efcbe6f3a22c503a68d147617bb30c4f5290f1eb3eaacf0b460440b"
115+
"checksumValue": "7a1d1f3a2b8f4484a9c2a027a157963c18f85a81785e85fcb5d1e3df6b6a4fd4"
116116
}
117117
],
118-
"downloadLocation": "https://github.com/python/cpython-source-deps/archive/refs/tags/tcl-core-8.6.15.0.tar.gz",
118+
"downloadLocation": "https://github.com/python/cpython-source-deps/archive/refs/tags/tcl-9.0.3.0.tar.gz",
119119
"externalRefs": [
120120
{
121121
"referenceCategory": "SECURITY",
122-
"referenceLocator": "cpe:2.3:a:tcl_tk:tcl_tk:8.6.15.0:*:*:*:*:*:*:*",
122+
"referenceLocator": "cpe:2.3:a:tcl_tk:tcl_tk:9.0.3.0:*:*:*:*:*:*:*",
123123
"referenceType": "cpe23Type"
124124
}
125125
],
126126
"licenseConcluded": "NOASSERTION",
127-
"name": "tcl-core",
127+
"name": "tcl",
128128
"primaryPackagePurpose": "SOURCE",
129-
"versionInfo": "8.6.15.0"
129+
"versionInfo": "9.0.3.0"
130130
},
131131
{
132132
"SPDXID": "SPDXRef-PACKAGE-tk",
133133
"checksums": [
134134
{
135135
"algorithm": "SHA256",
136-
"checksumValue": "0ae56d39bca92865f338529557a1e56d110594184b6dc5a91339c5675751e264"
136+
"checksumValue": "54fb59df12c489c6264f5b7d3d7444b150d1e3d6561fd59cdb11483440cec000"
137137
}
138138
],
139-
"downloadLocation": "https://github.com/python/cpython-source-deps/archive/refs/tags/tk-8.6.15.0.tar.gz",
139+
"downloadLocation": "https://github.com/python/cpython-source-deps/archive/refs/tags/tk-9.0.3.1.tar.gz",
140140
"externalRefs": [
141141
{
142142
"referenceCategory": "SECURITY",
143-
"referenceLocator": "cpe:2.3:a:tcl_tk:tcl_tk:8.6.15.0:*:*:*:*:*:*:*",
143+
"referenceLocator": "cpe:2.3:a:tcl_tk:tcl_tk:9.0.3.1:*:*:*:*:*:*:*",
144144
"referenceType": "cpe23Type"
145145
}
146146
],
147147
"licenseConcluded": "NOASSERTION",
148148
"name": "tk",
149149
"primaryPackagePurpose": "SOURCE",
150-
"versionInfo": "8.6.15.0"
150+
"versionInfo": "9.0.3.1"
151151
},
152152
{
153153
"SPDXID": "SPDXRef-PACKAGE-xz",

PCbuild/get_externals.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ if NOT "%IncludeLibffiSrc%"=="false" set libraries=%libraries% libffi-3.4.4
5757
if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-3.5.6
5858
set libraries=%libraries% mpdecimal-4.0.0
5959
set libraries=%libraries% sqlite-3.50.4.0
60-
if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.15.0
61-
if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-8.6.15.0
60+
if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-9.0.3.0
61+
if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-9.0.3.1
6262
set libraries=%libraries% xz-5.8.1.1
6363
set libraries=%libraries% zlib-ng-2.2.4
6464
set libraries=%libraries% zstd-1.5.7
@@ -80,7 +80,7 @@ echo.Fetching external binaries...
8080
set binaries=
8181
if NOT "%IncludeLibffi%"=="false" set binaries=%binaries% libffi-3.4.4
8282
if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-3.5.6
83-
if NOT "%IncludeTkinter%"=="false" set binaries=%binaries% tcltk-8.6.15.0
83+
if NOT "%IncludeTkinter%"=="false" set binaries=%binaries% tcltk-9.0.3.0
8484
if NOT "%IncludeSSLSrc%"=="false" set binaries=%binaries% nasm-2.11.06
8585
if NOT "%IncludeLLVM%"=="false" set binaries=%binaries% llvm-21.1.4.0
8686

PCbuild/readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ _sqlite3
247247
https://www.sqlite.org/
248248

249249
_tkinter
250-
Wraps version 8.6.15 of the Tk windowing system, which is downloaded
250+
Wraps version 9.0.3 of the Tk windowing system, which is downloaded
251251
from our binaries repository at
252252
https://github.com/python/cpython-bin-deps.
253253

PCbuild/tcltk.props

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Import Project="pyproject.props" Condition="$(__PyProject_Props_Imported) != 'true'" />
44
<PropertyGroup>
5-
<TclVersion Condition="$(TclVersion) == ''">8.6.15.0</TclVersion>
5+
<TclVersion Condition="$(TclVersion) == ''">9.0.3.0</TclVersion>
66
<TkVersion Condition="$(TkVersion) == ''">$(TclVersion)</TkVersion>
77
<TclMajorVersion>$([System.Version]::Parse($(TclVersion)).Major)</TclMajorVersion>
88
<TclMinorVersion>$([System.Version]::Parse($(TclVersion)).Minor)</TclMinorVersion>
@@ -12,7 +12,9 @@
1212
<TkMinorVersion>$([System.Version]::Parse($(TkVersion)).Minor)</TkMinorVersion>
1313
<TkPatchLevel>$([System.Version]::Parse($(TkVersion)).Build)</TkPatchLevel>
1414
<TkRevision>$([System.Version]::Parse($(TkVersion)).Revision)</TkRevision>
15-
<tclDir Condition="$(tclDir) == ''">$(ExternalsDir)tcl-core-$(TclVersion)\</tclDir>
15+
<!-- Back compat hack. If you're here wondering about -core vs not, do us both a favor and just override the whole tclDir variable -->
16+
<tclDir Condition="$(tclDir) == '' and $(TclMajorVersion) == '8'">$(ExternalsDir)tcl-core-$(TclVersion)\</tclDir>
17+
<tclDir Condition="$(tclDir) == ''">$(ExternalsDir)tcl-$(TclVersion)\</tclDir>
1618
<tkDir Condition="$(tkDir) == ''">$(ExternalsDir)tk-$(TkVersion)\</tkDir>
1719
<tcltkDir Condition="$(tcltkDir) == ''">$(ExternalsDir)tcltk-$(TclVersion)\$(ArchName)\</tcltkDir>
1820
<tcltkSuffix Condition="'$(TclMajorVersion)' == '8'">t</tcltkSuffix>

Tools/msi/tcltk/tcltk_files.wxs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@
1010
<Component Id="_tkinter.lib" Directory="libs" Guid="*">
1111
<File Name="_tkinter.lib" KeyPath="yes" />
1212
</Component>
13-
<Component Id="tcl86t.dll" Directory="DLLs" Guid="*">
14-
<File Name="tcl86t.dll" KeyPath="yes" />
13+
<Component Id="tcl90.dll" Directory="DLLs" Guid="*">
14+
<File Name="tcl90.dll" KeyPath="yes" />
1515
</Component>
16-
<Component Id="tk86t.dll" Directory="DLLs" Guid="*">
17-
<File Name="tk86t.dll" KeyPath="yes" />
16+
<Component Id="tcl9tk90.dll" Directory="DLLs" Guid="*">
17+
<File Name="tcl9tk90.dll" KeyPath="yes" />
18+
</Component>
19+
<Component Id="libtommath.dll" Directory="DLLs" Guid="*">
20+
<File Name="libtommath.dll" KeyPath="yes" />
1821
</Component>
1922
<Component Id="zlib1.dll" Directory="DLLs" Guid="*">
2023
<File Name="zlib1.dll" KeyPath="yes" />

Tools/msi/testrelease.bat

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ exit /B 0
8888
)
8989
@if not errorlevel 1 (
9090
@echo Testing Tcl/tk
91-
@set TCL_LIBRARY=%~2\Python\tcl\tcl8.6
9291
"%~2\Python\python.exe" -m test -uall -v test_ttk_guionly test_tk test_idle > "%~2\tcltk.txt" 2>&1
93-
@set TCL_LIBRARY=
9492
)
9593

9694
@set EXITCODE=%ERRORLEVEL%

0 commit comments

Comments
 (0)