Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-124111: Update tkinter for compatibility with Tcl/Tk 9.0.0 #124156

Merged
merged 30 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
797ab58
New branch for PR against Python 3.14.
culler Sep 17, 2024
03ccc1b
Ttk tests on linux
culler Sep 17, 2024
d7fdc88
Remove trailing whitespace.
culler Sep 17, 2024
9fe5e01
Add NEWS file.
culler Sep 17, 2024
144c754
Make Windows build work; adjust for new changes to Canvas.
culler Sep 19, 2024
3b21086
Attempt to restore autogenerated files that git tricked me into commi…
culler Sep 19, 2024
485e38a
Revert other autogenerated files committed by mistake
culler Sep 19, 2024
5a954ec
Revert one more autogenerated file committed by mistake
culler Sep 19, 2024
50d6958
Reference for combobox issue; address conditional definitions of _cli…
culler Sep 19, 2024
ee186de
Revert PCbuild changes; add examples for tk 9
culler Sep 19, 2024
1318d04
Adjust no_round for Canvas and Scrollbar.
culler Sep 20, 2024
e68994f
Adjust _clipped for Canvas once more.
culler Sep 20, 2024
c069c89
Hmmm = Canvas does clip highlightthickness.
culler Sep 20, 2024
8072c54
Remove message catalog.
culler Sep 20, 2024
ec56443
Force checks to rerun since CLA signing seems hung. (No changes.)
culler Sep 20, 2024
4f753f8
Merge branch 'tk9_for_python314' of github.com:culler/cpython into tk…
culler Sep 23, 2024
bf2243f
Update build files to use Tcl/Tk 8.6.14 by default but to allow any v…
culler Sep 23, 2024
77396d8
Add changes suggested by @zware
culler Sep 24, 2024
cf9b947
Remove trailing whitespace.
culler Sep 24, 2024
2ef001b
Deal with test_configure_width and test_configure_height for Notebooks.
culler Sep 25, 2024
cc50039
Merge branch 'tk9_for_python314' of github.com:culler/cpython into tk…
culler Sep 25, 2024
6a9ebc1
Need to make tests pass with 8.6.14 too, for the PR checks.
culler Sep 25, 2024
406aeff
Fix version tests in NotebookTest
culler Sep 25, 2024
5edecc1
Include changes suggested by @zware
culler Sep 25, 2024
f661969
Merge branch 'main' into tk9_for_python314
zware Sep 25, 2024
822c3bf
Add changes to tcltk.props and _tkinter.vcxproj suggested by @zooba
culler Sep 29, 2024
7d851a8
Merge branch 'tk9_for_python314' of github.com:culler/cpython into tk…
culler Sep 29, 2024
635d807
Merge branch 'main' into tk9_for_python314
culler Sep 29, 2024
ba09108
Merge remote-tracking branch 'origin/main' into tk9_for_python314
zware Nov 14, 2024
9075a80
Formatting fixups, remove note from build.bat
zware Nov 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Lib/test/test_tkinter/support.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import functools
import re
import tkinter

class AbstractTkTest:
Expand Down Expand Up @@ -112,6 +113,10 @@ def get_tk_patchlevel(root):
def pixels_conv(value):
return float(value[:-1]) * units[value[-1:]]

pix_re = re.compile(r'[0-9]*\.?[0-9]*[cimp]{1}')
def is_pixel_str(x):
return pix_re.fullmatch(x) != None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: this doesn't seem to be used anymore.


def tcl_obj_eq(actual, expected):
if actual == expected:
return True
Expand Down
10 changes: 6 additions & 4 deletions Lib/test/test_tkinter/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from tkinter import TclError
import enum
from test import support
from test.test_tkinter.support import AbstractTkTest, AbstractDefaultRootTest, requires_tk
from test.test_tkinter.support import AbstractTkTest, AbstractDefaultRootTest, requires_tk, tk_version
culler marked this conversation as resolved.
Show resolved Hide resolved

support.requires('gui')

Expand Down Expand Up @@ -66,9 +66,10 @@ def test_tk_busy(self):
f.tk_busy_forget()
self.assertFalse(f.tk_busy_status())
self.assertFalse(f.tk_busy_current())
with self.assertRaisesRegex(TclError, "can't find busy window"):
errmsg = r"can(no|')t find busy window.*"
with self.assertRaisesRegex(TclError, errmsg):
f.tk_busy_configure()
with self.assertRaisesRegex(TclError, "can't find busy window"):
with self.assertRaisesRegex(TclError, errmsg):
f.tk_busy_forget()

@requires_tk(8, 6, 6)
Expand All @@ -87,7 +88,8 @@ def test_tk_busy_with_cursor(self):
self.assertEqual(f.tk_busy_configure('cursor')[4], 'heart')

f.tk_busy_forget()
with self.assertRaisesRegex(TclError, "can't find busy window"):
errmsg = r"can(no|')t find busy window.*"
with self.assertRaisesRegex(TclError, errmsg):
f.tk_busy_cget('cursor')

def test_tk_setPalette(self):
Expand Down
Loading
Loading