From 81be3393f301894c7749fd57c6ecc11e1ccee35c Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Thu, 24 Sep 2020 23:09:49 +0100 Subject: [PATCH 1/4] bpo-39107: Updated Tcl and Tk to 8.6.10 in Windows installer --- .../next/Windows/2020-09-24-23-09-40.bpo-39107.GbUZvD.rst | 1 + PCbuild/get_externals.bat | 6 +++--- PCbuild/tcltk.props | 5 ++--- 3 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 Misc/NEWS.d/next/Windows/2020-09-24-23-09-40.bpo-39107.GbUZvD.rst diff --git a/Misc/NEWS.d/next/Windows/2020-09-24-23-09-40.bpo-39107.GbUZvD.rst b/Misc/NEWS.d/next/Windows/2020-09-24-23-09-40.bpo-39107.GbUZvD.rst new file mode 100644 index 00000000000000..51fea2d05c32ce --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2020-09-24-23-09-40.bpo-39107.GbUZvD.rst @@ -0,0 +1 @@ +Updated Tcl and Tk to 8.6.10 in Windows installer diff --git a/PCbuild/get_externals.bat b/PCbuild/get_externals.bat index a48b59cad2ed1c..b1709ac82b684e 100644 --- a/PCbuild/get_externals.bat +++ b/PCbuild/get_externals.bat @@ -55,8 +55,8 @@ set libraries=%libraries% bzip2-1.0.6 if NOT "%IncludeLibffiSrc%"=="false" set libraries=%libraries% libffi if NOT "%IncludeSSLSrc%"=="false" set libraries=%libraries% openssl-1.1.1g set libraries=%libraries% sqlite-3.32.3.0 -if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.9.0 -if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-8.6.9.0 +if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tcl-core-8.6.10.0 +if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tk-8.6.10.0 if NOT "%IncludeTkinterSrc%"=="false" set libraries=%libraries% tix-8.4.3.6 set libraries=%libraries% xz-5.2.2 set libraries=%libraries% zlib-1.2.11 @@ -78,7 +78,7 @@ echo.Fetching external binaries... set binaries= if NOT "%IncludeLibffi%"=="false" set binaries=%binaries% libffi if NOT "%IncludeSSL%"=="false" set binaries=%binaries% openssl-bin-1.1.1g -if NOT "%IncludeTkinter%"=="false" set binaries=%binaries% tcltk-8.6.9.0 +if NOT "%IncludeTkinter%"=="false" set binaries=%binaries% tcltk-8.6.10.0 if NOT "%IncludeSSLSrc%"=="false" set binaries=%binaries% nasm-2.11.06 for %%b in (%binaries%) do ( diff --git a/PCbuild/tcltk.props b/PCbuild/tcltk.props index 7fcd3e1c618c46..fb61bee5147211 100644 --- a/PCbuild/tcltk.props +++ b/PCbuild/tcltk.props @@ -4,7 +4,7 @@ 8 6 - 9 + 10 0 $(TclMajorVersion) $(TclMinorVersion) @@ -36,8 +36,7 @@ Release Debug $(BuildDirTop)_$(TclMachine) - $(BuildDirTop)_VC13 - $(BuildDirTop)_VC13 + $(BuildDirTop)_VC13 $(BuildDirTop)_VC12 $(BuildDirTop)_VC11 $(BuildDirTop)_VC10 From 9bcec1b231ad0785c34ea1e84c683be3f39296f8 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Thu, 24 Sep 2020 23:25:37 -0400 Subject: [PATCH 2/4] Make test_tk ScaleTest test_from platform sensitive. On Windows tk 8.6.10, tk Scale no longer rounds 'from', thus matching ttk Scale behavior. --- Lib/tkinter/test/test_tkinter/test_widgets.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/tkinter/test/test_tkinter/test_widgets.py b/Lib/tkinter/test/test_tkinter/test_widgets.py index 721e81369a8d5b..7f1ab7f85d065e 100644 --- a/Lib/tkinter/test/test_tkinter/test_widgets.py +++ b/Lib/tkinter/test/test_tkinter/test_widgets.py @@ -940,7 +940,8 @@ def test_digits(self): def test_from(self): widget = self.create() - self.checkFloatParam(widget, 'from', 100, 14.9, 15.1, conv=float_round) + cvt = False if sys.platform == 'win32' else float_round # 39107 + self.checkFloatParam(widget, 'from', 100, 14.9, 15.1, conv=cvt) def test_label(self): widget = self.create() From 7122845a19fc554c0e63f0d7a941b6c2aeb52521 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Fri, 25 Sep 2020 07:39:32 -0400 Subject: [PATCH 3/4] Address Serhiy's comments. --- Lib/tkinter/test/test_tkinter/test_widgets.py | 5 +++-- .../next/Windows/2020-09-24-23-09-40.bpo-39107.GbUZvD.rst | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Lib/tkinter/test/test_tkinter/test_widgets.py b/Lib/tkinter/test/test_tkinter/test_widgets.py index 7f1ab7f85d065e..2419492b300971 100644 --- a/Lib/tkinter/test/test_tkinter/test_widgets.py +++ b/Lib/tkinter/test/test_tkinter/test_widgets.py @@ -940,8 +940,9 @@ def test_digits(self): def test_from(self): widget = self.create() - cvt = False if sys.platform == 'win32' else float_round # 39107 - self.checkFloatParam(widget, 'from', 100, 14.9, 15.1, conv=cvt) + tk_patchlevel = widget.tk.call('info', 'patchlevel') + conv = False if tk_patchlevel == '8.6.10' else float_round # 39107 + self.checkFloatParam(widget, 'from', 100, 14.9, 15.1, conv=conv) def test_label(self): widget = self.create() diff --git a/Misc/NEWS.d/next/Windows/2020-09-24-23-09-40.bpo-39107.GbUZvD.rst b/Misc/NEWS.d/next/Windows/2020-09-24-23-09-40.bpo-39107.GbUZvD.rst index 51fea2d05c32ce..889ad481404e49 100644 --- a/Misc/NEWS.d/next/Windows/2020-09-24-23-09-40.bpo-39107.GbUZvD.rst +++ b/Misc/NEWS.d/next/Windows/2020-09-24-23-09-40.bpo-39107.GbUZvD.rst @@ -1 +1 @@ -Updated Tcl and Tk to 8.6.10 in Windows installer +Update Tcl and Tk to 8.6.10 in Windows installer. From eee6bb50c69d94280f43b47390ea9d1b5f42930c Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Fri, 25 Sep 2020 14:45:09 -0400 Subject: [PATCH 4/4] Use get_tk_patchlevel. --- Lib/tkinter/test/test_tkinter/test_widgets.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Lib/tkinter/test/test_tkinter/test_widgets.py b/Lib/tkinter/test/test_tkinter/test_widgets.py index 2419492b300971..b6f792d6c2cf85 100644 --- a/Lib/tkinter/test/test_tkinter/test_widgets.py +++ b/Lib/tkinter/test/test_tkinter/test_widgets.py @@ -940,8 +940,7 @@ def test_digits(self): def test_from(self): widget = self.create() - tk_patchlevel = widget.tk.call('info', 'patchlevel') - conv = False if tk_patchlevel == '8.6.10' else float_round # 39107 + conv = False if get_tk_patchlevel() >= (8, 6, 10) else float_round self.checkFloatParam(widget, 'from', 100, 14.9, 15.1, conv=conv) def test_label(self):