Skip to content

[3.13] gh-128846: Fix test_configure_custom_copy for the aqua theme with Tk 9#153611

Merged
serhiy-storchaka merged 3 commits into
python:3.13from
serhiy-storchaka:gh-128846-ttk-style-copy-test
Jul 15, 2026
Merged

[3.13] gh-128846: Fix test_configure_custom_copy for the aqua theme with Tk 9#153611
serhiy-storchaka merged 3 commits into
python:3.13from
serhiy-storchaka:gh-128846-ttk-style-copy-test

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

On macOS with the aqua theme and Tk 9, an empty ttk style option value is
read back as an empty tuple rather than an empty string, so
test_configure_custom_copy failed when comparing a copied style against its
default. Normalize the empty tuple to an empty string before comparing.

Test-only; 3.13 lacks the _tclobj_to_py normalization that fixes this in
the library on 3.14+.

…heme with Tk 9

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comment thread Lib/test/test_ttk/test_style.py
…stom_copy

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) July 14, 2026 13:09
On the aqua theme with Tk 9 the native style reports an unset option as an
empty tuple, while a copied (non-native) style reports it as an empty string.
The comparison of the copy against the default therefore has to normalize the
empty tuple in the default.  An earlier one-sided normalization of the copy
regressed the CI, which links Tk 8.6, where the native style already reports
an empty string.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@serhiy-storchaka serhiy-storchaka merged commit 90b33e6 into python:3.13 Jul 15, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir topic-tkinter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant