Skip to content

gh-153380: Adapt ttk tests to Tk 9.1 changes#153381

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:fix-ttk-tk91-test-failures
Jul 9, 2026
Merged

gh-153380: Adapt ttk tests to Tk 9.1 changes#153381
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:fix-ttk-tk91-test-failures

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jul 9, 2026

Copy link
Copy Markdown
Member

Adapt the ttk tests to intentional behaviour changes in Tk 9.1:

  • test_configure_selectmode — the new single and multiple select modes.
  • test_setTreeview.set(item) now includes the tree column #0.
  • test_insert_item, test_selection — an item id keeps the type of the passed value (e.g. int or bytes).
  • test_heading_callback — click elsewhere between the two heading clicks so the second one is not reported as a double click.
  • test_theme_create_image — the border element width is now display-scaled, so no longer assert the exact requested width.

Test-only changes; tkinter behaviour is unchanged. No CI runs Tk 9.1b1 yet — verified locally against a Tk 9.1b1 build with wantobjects 0 and 1.

- selectmode: new 'single' and 'multiple' modes
- set(): includes the tree column '#0'
- insert()/selection(): item ids keep the passed value's type
- heading_callback: avoid a double click on the second click
- theme_create_image: don't assert the exact (now scaled) width

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@serhiy-storchaka serhiy-storchaka added tests Tests in the Lib/test dir skip news topic-tkinter needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jul 9, 2026
@serhiy-storchaka serhiy-storchaka merged commit d6855c8 into python:main Jul 9, 2026
62 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@serhiy-storchaka serhiy-storchaka deleted the fix-ttk-tk91-test-failures branch July 9, 2026 06:07
@bedevere-app

bedevere-app Bot commented Jul 9, 2026

Copy link
Copy Markdown

GH-153386 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 9, 2026
@bedevere-app

bedevere-app Bot commented Jul 9, 2026

Copy link
Copy Markdown

GH-153387 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 9, 2026
@bedevere-app

bedevere-app Bot commented Jul 9, 2026

Copy link
Copy Markdown

GH-153388 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jul 9, 2026
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