GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [3.14] gh-154357: Fix tkinter, ttk and IDLE tests depending on the window manager (GH-154370) by serhiy-storchaka · Pull Request #157064 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Sep 7, 2026

Copy link
Copy Markdown
Member

Manual backport of GH-154370: the cherry-pick does not apply, because this branch does not have all the tests which the original commit changes. The changes to test_wm_stackorder are omitted -- there is no such test on this branch.

The window manager can take the focus from the application, ignore lift() and resize a toplevel on its own. Tk delivers generated keyboard events to the window which has the focus, so a test which lost the focus does not get the event at all.

  • Hide the root window in the dialog tests, so that it does not compete for the focus.
  • Take the focus right before generating a key event.
  • Tolerate additional focus events.
  • Do not check focus_get() and focus_displayof() without the focus.
  • Resize the toplevel to fit its content in wait_until_mapped().
  • Issue: Tkinter: test_boundary_values_accepted fails #154357

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@serhiy-storchaka
[3.14] pythongh-154357: Fix tkinter, ttk and IDLE tests depending on …
20ad6b6
…the window manager (pythonGH-154370)

The window manager can take the focus from the application, ignore
lift() and resize a toplevel on its own.

* Hide the root window in the dialog tests, so that it does not compete
  for the focus.
* Take the focus right before generating a key event.
* Tolerate additional focus events.
* Do not check focus_get() and focus_displayof() without the focus.
* Resize the toplevel to fit its content in wait_until_mapped().

(cherry picked from commit 3b56438)
@serhiy-storchaka
serhiy-storchaka requested a review from terryjreedy as a code owner September 7, 2026 11:29
@bedevere-app bedevere-app Bot mentioned this pull request Sep 7, 2026
Tkinter: test_boundary_values_accepted fails #154357
Closed
@bedevere-app bedevere-app Bot added the awaiting core review label Sep 7, 2026
@serhiy-storchaka serhiy-storchaka added the skip news label Sep 7, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Sep 7, 2026
gh-154357: Fix tkinter, ttk and IDLE tests depending on the window manager #154370
Merged
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) September 7, 2026 11:50
@serhiy-storchaka
serhiy-storchaka disabled auto-merge September 7, 2026 12:32
@serhiy-storchaka
Keep the root window visible in SimpleDialogTest
3276e57
SimpleDialog makes its window transient for the master unconditionally on
this branch, and a transient of a hidden window is never mapped on
Windows, so that go() blocks in wait_visibility().
@serhiy-storchaka
serhiy-storchaka merged commit 90464d6 into python:3.14 Sep 7, 2026
47 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting core review label Sep 7, 2026
@serhiy-storchaka
serhiy-storchaka deleted the backport-3b56438-3.14 branch September 7, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@terryjreedy terryjreedy Awaiting requested review from terryjreedy terryjreedy is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@serhiy-storchaka
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.