[3.13] gh-128846: Make tkinter tests robust against Tcl/Tk 9.0#153484
Open
serhiy-storchaka wants to merge 1 commit into
Open
[3.13] gh-128846: Make tkinter tests robust against Tcl/Tk 9.0#153484serhiy-storchaka wants to merge 1 commit into
serhiy-storchaka wants to merge 1 commit into
Conversation
Backport the test-only parts of the Tcl/Tk 8.7/9.0/9.1 test adaptations so that test_tkinter and test_ttk pass when Python 3.13 is built against Tcl/Tk 9.0 (for example the Homebrew build used on macOS), while still passing against the Tcl/Tk 8.6 that 3.13 ships. Combines the test changes from: * pythongh-124111: Update tkinter for compatibility with Tcl/Tk 9.0.0 (pythonGH-124156) * pythongh-124111: test macOS CI with Tk 9 (pythonGH-137424) * pythongh-145736: Fix Tkinter tests for Tk 8.7, 9.0 and 9.1 (pythonGH-145738) The corresponding non-test changes (Modules/_tkinter.c, Lib/tkinter/ttk.py, PCbuild and CI configuration) are not backported. The \z regular-expression escape introduced by pythongh-133306 is not available in the 3.13 re module, so \Z is kept.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport the test-only parts of the Tcl/Tk 8.7/9.0/9.1 test adaptations so that
test_tkinterandtest_ttkpass when Python 3.13 is built against Tcl/Tk 9.0 or 9.1 (for example the Homebrew build used on macOS — see gh-128846), while still passing against the Tcl/Tk 8.6 that 3.13 ships.These adaptations were made during 3.14/3.15 development and never backported to 3.13, so building 3.13 against Tk 9.0 currently produces ~90 spurious
test_tkinterfailures and severaltest_ttkfailures (error-message wording such asdoesn't→does notandcan't→cannot find busy window, pixel rounding/scaling, clipped negative sizes,identify()returningpaddinginstead offocus, etc.).This combines the test changes from:
The corresponding non-test changes (
Modules/_tkinter.c,Lib/tkinter/ttk.py,PCbuildand CI configuration) are not backported. The\zregular-expression escape introduced by gh-133306 is not available in the 3.13remodule, so\Zis kept.The
NotebookTest.test_traversalhardening is handled separately by GH-153415 (already merged) and is not part of this PR.Verified locally against Tcl/Tk 8.6, 9.0.4 and 9.1b1 (the affected
test_tkinterandtest_ttkmethods pass on all three); the set of collected test cases is unchanged, so no test coverage is dropped.