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 — gh-151678: Add tests for tkinter Misc, Wm and geometry manager methods by serhiy-storchaka · Pull Request #151732 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jun 19, 2026

Copy link
Copy Markdown
Member

Cover previously-untested methods of the Misc, Wm, Pack, Place and Grid classes:

  • a new WinfoTest class for the winfo_* query methods (class, name, parent, children, toplevel, visual and screen information, atoms, pointer and screen coordinates, fpixels, containing, interps, viewable), including the pre-existing winfo_rgb and winfo_pathname;
  • in MiscTest: getint, getdouble, getvar, register, deletecommand, option_add/option_get/option_clear, nametowidget, the focus_*, grab_* and selection_own* methods, event_add/event_delete/event_info, and bell;
  • in WmTest: title, geometry, minsize/maxsize, resizable, aspect, grid, positionfrom/sizefrom, focusmodel, iconname, client/command, overrideredirect, state (with withdraw and deiconify), frame, group, protocol and transient;
  • the short-named aliases of the grid_*, pack_* and place_* geometry manager methods.

Platform-specific behavior (Windows, macOS/Aqua) is guarded where it differs from X11.

  • Issue: Improve test coverage of tkinter #151678

Sorry, something went wrong.

Uh oh!

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

All reactions
@serhiy-storchaka @claude
pythongh-151678: Add tests for tkinter Misc, Wm and geometry manager …
36ae602
…methods

Cover previously-untested methods of the Misc, Wm, Pack, Place and Grid
classes:

* a new WinfoTest class for the winfo_* query methods (class, name,
  parent, children, toplevel, visual and screen information, atoms,
  pointer and screen coordinates, fpixels, containing, interps,
  viewable), including the pre-existing winfo_rgb and winfo_pathname;
* in MiscTest: getint, getdouble, getvar, register, deletecommand,
  option_add/get/clear, nametowidget, the focus_*, grab_* and
  selection_own* methods, event_add/delete/info, and bell;
* in WmTest: title, geometry, minsize/maxsize, resizable, aspect, grid,
  positionfrom/sizefrom, focusmodel, iconname, client/command,
  overrideredirect, state (with withdraw and deiconify), frame, group,
  protocol and transient;
* the short-named aliases of the grid_*, pack_* and place_* geometry
  manager methods.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label Jun 19, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Jun 19, 2026
Improve test coverage of tkinter #151678
Closed
@bedevere-app bedevere-app Bot added the awaiting core review label Jun 19, 2026
@serhiy-storchaka @claude
pythongh-151678: Fix tkinter Wm/Winfo tests on Windows and Aqua
c971201
winfo_fpixels() reports a different bad-distance message on Tk 9; the wm
command and client hints are X11 properties whose round trip (with the
command returned as a split list on Aqua) is now only checked on X11;
and Aqua enforces a minimum window width, so use larger minsize values.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@serhiy-storchaka serhiy-storchaka added skip news needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Jun 19, 2026
@serhiy-storchaka
serhiy-storchaka merged commit 23793ac into python:main Jun 19, 2026
95 of 97 checks passed

Uh oh!

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

@miss-islington-app

miss-islington-app Bot commented Jun 19, 2026

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.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting core review label Jun 19, 2026
@serhiy-storchaka
serhiy-storchaka deleted the test-tkinter-misc-wm-geometry branch June 19, 2026 14:38
@bedevere-app

bedevere-app Bot commented Jun 19, 2026

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Jun 19, 2026
@bedevere-app

bedevere-app Bot commented Jun 19, 2026

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

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

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

bedevere-app Bot commented Jun 19, 2026

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Jun 19, 2026
serhiy-storchaka added a commit that referenced this pull request Jun 19, 2026
@miss-islington @serhiy-storchaka @claude
[3.15] gh-151678: Add tests for tkinter Misc, Wm and geometry manager…
81ceb56
… methods (GH-151732) (GH-151737)

Cover previously-untested methods of the Misc, Wm, Pack, Place and Grid
classes:

* a new WinfoTest class for the winfo_* query methods (class, name,
  parent, children, toplevel, visual and screen information, atoms,
  pointer and screen coordinates, fpixels, containing, interps,
  viewable), including the pre-existing winfo_rgb and winfo_pathname;
* in MiscTest: getint, getdouble, getvar, register, deletecommand,
  option_add/get/clear, nametowidget, the focus_*, grab_* and
  selection_own* methods, event_add/delete/info, and bell;
* in WmTest: title, geometry, minsize/maxsize, resizable, aspect, grid,
  positionfrom/sizefrom, focusmodel, iconname, client/command,
  overrideredirect, state (with withdraw and deiconify), frame, group,
  protocol and transient;
* the short-named aliases of the grid_*, pack_* and place_* geometry
  manager methods.
(cherry picked from commit 23793ac)

Co-authored-by: Serhiy Storchaka <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
serhiy-storchaka added a commit that referenced this pull request Jun 19, 2026
@miss-islington @serhiy-storchaka @claude
[3.13] gh-151678: Add tests for tkinter Misc, Wm and geometry manager…
232764e
… methods (GH-151732) (GH-151739)

Cover previously-untested methods of the Misc, Wm, Pack, Place and Grid
classes:

* a new WinfoTest class for the winfo_* query methods (class, name,
  parent, children, toplevel, visual and screen information, atoms,
  pointer and screen coordinates, fpixels, containing, interps,
  viewable), including the pre-existing winfo_rgb and winfo_pathname;
* in MiscTest: getint, getdouble, getvar, register, deletecommand,
  option_add/get/clear, nametowidget, the focus_*, grab_* and
  selection_own* methods, event_add/delete/info, and bell;
* in WmTest: title, geometry, minsize/maxsize, resizable, aspect, grid,
  positionfrom/sizefrom, focusmodel, iconname, client/command,
  overrideredirect, state (with withdraw and deiconify), frame, group,
  protocol and transient;
* the short-named aliases of the grid_*, pack_* and place_* geometry
  manager methods.
(cherry picked from commit 23793ac)

Co-authored-by: Serhiy Storchaka <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
serhiy-storchaka added a commit that referenced this pull request Jun 19, 2026
@miss-islington @serhiy-storchaka @claude
[3.14] gh-151678: Add tests for tkinter Misc, Wm and geometry manager…
c843def
… methods (GH-151732) (GH-151738)

Cover previously-untested methods of the Misc, Wm, Pack, Place and Grid
classes:

* a new WinfoTest class for the winfo_* query methods (class, name,
  parent, children, toplevel, visual and screen information, atoms,
  pointer and screen coordinates, fpixels, containing, interps,
  viewable), including the pre-existing winfo_rgb and winfo_pathname;
* in MiscTest: getint, getdouble, getvar, register, deletecommand,
  option_add/get/clear, nametowidget, the focus_*, grab_* and
  selection_own* methods, event_add/delete/info, and bell;
* in WmTest: title, geometry, minsize/maxsize, resizable, aspect, grid,
  positionfrom/sizefrom, focusmodel, iconname, client/command,
  overrideredirect, state (with withdraw and deiconify), frame, group,
  protocol and transient;
* the short-named aliases of the grid_*, pack_* and place_* geometry
  manager methods.
(cherry picked from commit 23793ac)

Co-authored-by: Serhiy Storchaka <[email protected]>
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@bedevere-bot

bedevere-bot commented Jun 19, 2026

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot PPC64LE Fedora Stable LTO 3.13 (tier-2) has failed when building commit 232764e.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1492/builds/1237) and take a look at the build logs.
  4. Check if the failure is related to this commit (232764e) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1492/builds/1237

Failed tests:

  • test_tools

Summary of the results of the build (if available):

==

Click to see traceback logs
Note: switching to '232764e6078b7d6b21931a71cb22b2a226a365d4'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 232764e6078 [3.13] gh-151678: Add tests for tkinter Misc, Wm and geometry manager methods (GH-151732) (GH-151739)
Switched to and reset branch '3.13'

In function ‘hashtable_key_from_2_strings’,
    inlined from ‘_extensions_cache_find_unlocked’ at Python/import.c:1284:17:
Python/import.c:1197:5: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
 1197 |     strncpy(key, str1_data, str1_len);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Python/import.c:1183:27: note: length computed here
 1183 |     Py_ssize_t str1_len = strlen(str1_data);
      |                           ^~~~~~~~~~~~~~~~~
In file included from ./Include/Python.h:14,
                 from ./Modules/_testexternalinspection.c:53:
./pyconfig.h:1964:9: warning: ‘_POSIX_C_SOURCE’ redefined
 1964 | #define _POSIX_C_SOURCE 200809L
      |         ^~~~~~~~~~~~~~~
In file included from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdint.h:26,
                 from /usr/lib/gcc/ppc64le-redhat-linux/16/include/stdint.h:11,
                 from /usr/include/elf.h:24,
                 from ./Modules/_testexternalinspection.c:4:
/usr/include/features.h:319:10: note: this is the location of the previous definition
  319 | # define _POSIX_C_SOURCE        202405L
      |          ^~~~~~~~~~~~~~~
./pyconfig.h:1985:9: warning: ‘_XOPEN_SOURCE’ redefined
 1985 | #define _XOPEN_SOURCE 700
      |         ^~~~~~~~~~~~~
/usr/include/features.h:234:10: note: this is the location of the previous definition
  234 | # define _XOPEN_SOURCE  800
      |          ^~~~~~~~~~~~~

make: *** [Makefile:2252: buildbottest] Error 2
All reactions

Sorry, something went wrong.

Uh oh!

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

pyctrl pushed a commit to pyctrl/cpython that referenced this pull request Jul 5, 2026
@serhiy-storchaka @claude @pyctrl
pythongh-151678: Add tests for tkinter Misc, Wm and geometry manager …
8058cd4
…methods (pythonGH-151732)

Cover previously-untested methods of the Misc, Wm, Pack, Place and Grid
classes:

* a new WinfoTest class for the winfo_* query methods (class, name,
  parent, children, toplevel, visual and screen information, atoms,
  pointer and screen coordinates, fpixels, containing, interps,
  viewable), including the pre-existing winfo_rgb and winfo_pathname;
* in MiscTest: getint, getdouble, getvar, register, deletecommand,
  option_add/get/clear, nametowidget, the focus_*, grab_* and
  selection_own* methods, event_add/delete/info, and bell;
* in WmTest: title, geometry, minsize/maxsize, resizable, aspect, grid,
  positionfrom/sizefrom, focusmodel, iconname, client/command,
  overrideredirect, state (with withdraw and deiconify), frame, group,
  protocol and transient;
* the short-named aliases of the grid_*, pack_* and place_* geometry
  manager methods.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

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

Assignees

No one assigned

Labels

skip news tests Tests in the Lib/test dir

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.

2 participants

@serhiy-storchaka @bedevere-bot
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 01402520 — 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.