For test_widgets.MenuTest.test_configure_type, the options
in the error message change to alphabetical order.
---------
(cherry picked from commit 897e716d03)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-103685: Fix tkinter.Menu.index() for Tk 8.7 (GH-103686)
---------
(cherry picked from commit f0ed293f6a)
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
It is a prerequisite for GH-94473. Add tests for the coords() method and
for creation of some Canvas items.
(cherry picked from commit ff173ed2f6)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Previously, checkbuttons in different parent widgets could have the same
short name and share the same state if arguments "name" and "variable" are
not specified. Now they are globally unique.
(cherry picked from commit adbed2d542)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Since v8.6.11, a few configuration options seem to accept an empty value
where they did not previously; particularly the `type` of a `Menu`
widget, and the `compound` of any ttk widget with a label. Providing an
explicit expected error message to `checkEnumParam` bypasses the check
of an empty value, which no longer raises `TclError`.
* Tkinter functions and constructors which need a default root window
raise now RuntimeError with descriptive message instead of obscure
AttributeError or NameError if it is not created yet or cannot
be created automatically.
* Add tests for all functions which use default root window.
* Fix import in the pynche script.
This fixes the test failure with Tk 6.8.10 which is caused by changes to how Tk rounds the `from`, `to` and `tickinterval` arguments. This PR uses `noconv` if the patchlevel is greater than or equal to 8.6.10 (credit to Serhiy for this idea as it is much simpler than what I previously proposed).
Going into more detail for those who want it, the Tk change was made in [commit 591f68c](591f68cb38) and means that the arguments listed above are rounded relative to the value of `from`. However, when rounding the `from` argument ([line 623](591f68cb38/generic/tkScale.c (L623))), it is rounded relative to itself (i.e. rounding `0`) and therefore the assigned value for `from` is always what is given (no matter what values of `from` and `resolution`).
Automerge-Triggered-By: @pablogsal
window is created for every test class.
Fixed Tkinter images copying operations in NoDefaultRoot mode.
Tcl command names generated for "after" callbacks now contains a name of
original function.
window is created for every test class.
Fixed Tkinter images copying operations in NoDefaultRoot mode.
Tcl command names generated for "after" callbacks now contains a name of
original function.