summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter
Commit message (Collapse)AuthorAgeFilesLines
* [3.11] gh-113951: Tkinter: "tag_unbind(tag, sequence, funcid)" now only ↵Miss Islington (bot)2024-02-042-11/+110
| | | | | | | | | | | | | | unbinds "funcid" (GH-113955) (GH-114998) Previously, "tag_unbind(tag, sequence, funcid)" methods of Text and Canvas widgets destroyed the current binding for "sequence", leaving "sequence" unbound, and deleted the "funcid" command. Now they remove only "funcid" from the binding for "sequence", keeping other commands, and delete the "funcid" command. They leave "sequence" unbound only if "funcid" was the last bound command. (cherry picked from commit 7e42fddf608337e83b30401910d76fd75d5cf20a) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-110345: show Tcl/Tk patchlevel in `tkinter._test()` (GH-110350) ↵Miss Islington (bot)2024-01-181-1/+1
| | | | | | | (GH-114252) (cherry picked from commit b8f29b1293f55e12e86a2a039b49b6f9f73851b7) Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
* [3.11] gh-113877: Fix Tkinter method winfo_pathname() on 64-bit Windows ↵Miss Islington (bot)2024-01-102-0/+14
| | | | | | | | | | (GH-113900) (GH-113902) winfo_id() converts the result of "winfo id" command to integer, but "winfo pathname" command requires an argument to be a hexadecimal number on Win64. (cherry picked from commit 1b7e0024a16c1820f61c04a8a100498568410afd) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-75666: Tkinter: "unbind(sequence, funcid)" now only unbinds ↵Miss Islington (bot)2023-12-062-11/+45
| | | | | | | | | | | | | | | | "funcid" (GH-111322) (GH-112801) Previously, "widget.unbind(sequence, funcid)" destroyed the current binding for "sequence", leaving "sequence" unbound, and deleted the "funcid" command. Now it removes only "funcid" from the binding for "sequence", keeping other commands, and deletes the "funcid" command. It leaves "sequence" unbound only if "funcid" was the last bound command. (cherry picked from commit cc7e45cc572dd818412a649970fdee579417701f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: GiovanniL <13402461+GiovaLomba@users.noreply.github.com>
* [3.11] gh-68166: Tkinter: Add tests and examples for element_create() ↵Miss Islington (bot)2023-11-271-1/+183
| | | | | | | | | | | (GH-111453) (GH-111858) * Remove mention of "vsapi" element type from the documentation. * Add tests for element_create() and other ttk.Style methods. * Add examples for element_create() in the documentation. (cherry picked from commit 005d1e8fc81539c60c6b21ebba34de3edd5bb232) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-111531: Tkinter: fix reference leaks in bind_class() and ↵Miss Islington (bot)2023-10-311-2/+2
| | | | | | | bind_all() (GH-111533) (GH-111536) (cherry picked from commit e3353c498d79f0f3f108a9baf8807a12e77c2ebe) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-75666: Tkinter: add tests for binding (GH-111202) (GH-111256)Miss Islington (bot)2023-10-241-0/+307
| | | | | (cherry picked from commit 9bb202a1a90ef0edce20c495c9426d9766df11bb) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-107705: Fix file leak in test_tkinter in the C locale (GH-110507) ↵Miss Islington (bot)2023-10-141-5/+10
| | | | | | | (GH-110858) (cherry picked from commit ca0f3d858d069231ce7c5b382790a774f385b467) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-100814: Fix exception for invalid callable value of Tkinter image ↵Miss Islington (bot)2023-08-162-4/+16
| | | | | | | | | option (GH-107692) (GH-107723) Passing a callable object as an option value to a Tkinter image now raises the expected TclError instead of an AttributeError. (cherry picked from commit 50e3cc9748eb2103eb7ed6cc5a74d177df3cfb13) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-104496: Use correct Tcl or Tk version in Tkinter tests (GH-107688) ↵Serhiy Storchaka2023-08-076-28/+28
| | | | | | (GH-107719) In future Tcl and Tk versions can be desynchronized. (cherry picked from commit 3c8e8f3ceeae08fc43d885f5a4c65a3ee4b1a2c8)
* [3.11] gh-104497: Make tkinter test pass with tk 8.7 (GH-104789) (#105029)Miss Islington (bot)2023-05-271-1/+4
| | | | | | | | | | For test_widgets.MenuTest.test_configure_type, the options in the error message change to alphabetical order. --------- (cherry picked from commit 897e716d03d559a10dd5015ecb501ceb98955f3a) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.11] gh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors ↵Miss Islington (bot)2023-05-171-4/+6
| | | | | | | | | | (GH-104495) (#104569) gh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors (GH-104495) (cherry picked from commit 3cba61f111db9b5e8ef35632915309f81fff8c6c) Co-authored-by: Christopher Chavez <chrischavez@gmx.us> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.11] gh-104461: Run tkinter test_configure_screen on X11 only (GH-104526)Miss Islington (bot)2023-05-161-0/+2
| | | Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
* [3.11] gh-103685: Fix tkinter.Menu.index() for Tk 8.7 (GH-103686) (#103734)Miss Islington (bot)2023-04-242-2/+6
| | | | | | | | | | | gh-103685: Fix tkinter.Menu.index() for Tk 8.7 (GH-103686) --------- (cherry picked from commit f0ed293f6aec1c2ed22725301b77d6ccedc2d486) 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>
* gh-57762: fix misleading tkinter.Tk docstring (GH-98837)Miss Islington (bot)2022-12-221-1/+1
| | | | | | | Mentioned as a desired change by terryjreedy on the corresponding issue, since Tk is not a subclass of Toplevel. (cherry picked from commit ad23da0e77c4c4a3185df64d1c199b8c17e08188) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* Add more tkinter.Canvas tests (GH-98475)Miss Islington (bot)2022-10-201-0/+158
| | | | | | | It is a prerequisite for GH-94473. Add tests for the coords() method and for creation of some Canvas items. (cherry picked from commit ff173ed2f6b07f38ec18f854daba6451bf1a9000) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-97928: Fix handling options starting with "-" in tkinter.Text.count() ↵Miss Islington (bot)2022-10-192-4/+2
| | | | | | | | (GH-98436) Previously they were silently ignored. Now they are errors. (cherry picked from commit e4ec8de6fa6f0a07e64f6a3e3f894926b4b0652d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-97928: Add tests for tkinter.Text.count() (GH-98269)Miss Islington (bot)2022-10-191-0/+54
| | | | | (cherry picked from commit 1b684c8f5f738b56f859e5c87b7280610b90399f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-73588: Fix generation of the default name of tkinter.Checkbutton. (GH-97547)Miss Islington (bot)2022-09-275-3/+54
| | | | | | | | 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 adbed2d542a815b8175db965742211856b19b52f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-13553: Document tkinter.Tk args (GH-4786)Miss Islington (bot)2022-05-101-4/+4
| | | | | (cherry picked from commit c56e2bb9949c95ec8911cd5554b07044a564796f) Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
* gh-91827: Add method info_pathlevel() in tkinter (GH-91829)Serhiy Storchaka2022-05-064-10/+59
|
* bpo-46996: Remove support of Tcl/Tk < 8.5.12 (GH-31839)Serhiy Storchaka2022-03-175-141/+57
|
* bpo-45979: Fix Tkinter tests with old Tk (>= 8.5.12) (GH-31938)Serhiy Storchaka2022-03-162-3/+5
|
* bpo-45496: Allow flexibility in winfo_rgb tests (GH-30185)E-Paine2021-12-261-2/+9
|
* bpo-27313: Use non-deprecated methods for tracing (GH-29425)Serhiy Storchaka2021-11-061-5/+5
|
* bpo-27313: Fix ttk_guionly tests failing on Framework builds on macOS (GH-29411)Łukasz Langa2021-11-051-46/+20
|
* bpo-45160: Fix refleak in test_ttk_guionly introduced in GH-28291 (GH-29416)Łukasz Langa2021-11-051-1/+4
|
* bpo-45160: Ttk optionmenu only set variable once (GH-28291)E-Paine2021-10-212-1/+17
|
* Cleanup a couple of comments left on PR 28775 post-merge. (GH-29079)Gregory P. Smith2021-10-201-1/+1
|
* bpo-45436: Fix tkinter tests with Tcl/Tk 8.6.11+ (GH-29077)Zachary Ware2021-10-202-5/+11
| | | | | | | 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`.
* bpo-45229: Make tkinter tests discoverable (GH-28637)Serhiy Storchaka2021-10-1314-572/+19
|
* Fix typos in the Lib directory (GH-28775)Christian Clauss2021-10-062-4/+4
| | | | | Fix typos in the Lib directory as identified by codespell. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-25130: Add calls of gc.collect() in tests to support PyPy (GH-28005)Serhiy Storchaka2021-08-294-2/+17
|
* bpo-44404: tkinter `after` support callable classes (GH-26812)E-Paine2021-06-232-1/+12
|
* bpo-41730: Show deprecation warnings for tkinter.tix (GH-22186)wyz23x22021-05-071-1/+8
| | | | Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com> Co-authored-by: Zachary Ware <zach@python.org>
* bpo-43655: Tkinter and IDLE dialog windows are now recognized as dialogs by ↵Serhiy Storchaka2021-04-252-0/+14
| | | | window managers on macOS and X Window (#25187)
* bpo-38659: [Enum] add _simple_enum decorator (GH-25497)Ethan Furman2021-04-212-3/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add: * `_simple_enum` decorator to transform a normal class into an enum * `_test_simple_enum` function to compare * `_old_convert_` to enable checking `_convert_` generated enums `_simple_enum` takes a normal class and converts it into an enum: @simple_enum(Enum) class Color: RED = 1 GREEN = 2 BLUE = 3 `_old_convert_` works much like` _convert_` does, using the original logic: # in a test file import socket, enum CheckedAddressFamily = enum._old_convert_( enum.IntEnum, 'AddressFamily', 'socket', lambda C: C.isupper() and C.startswith('AF_'), source=_socket, ) `_test_simple_enum` takes a traditional enum and a simple enum and compares the two: # in the REPL or the same module as Color class CheckedColor(Enum): RED = 1 GREEN = 2 BLUE = 3 _test_simple_enum(CheckedColor, Color) _test_simple_enum(CheckedAddressFamily, socket.AddressFamily) Any important differences will raise a TypeError
* Revert "bpo-38659: [Enum] add _simple_enum decorator (GH-25285)" (GH-25476)Ethan Furman2021-04-202-46/+3
| | | This reverts commit dbac8f40e81eb0a29dc833e6409a1abf47467da6.
* bpo-38659: [Enum] add _simple_enum decorator (GH-25285)Ethan Furman2021-04-202-3/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add: _simple_enum decorator to transform a normal class into an enum _test_simple_enum function to compare _old_convert_ to enable checking _convert_ generated enums _simple_enum takes a normal class and converts it into an enum: @simple_enum(Enum) class Color: RED = 1 GREEN = 2 BLUE = 3 _old_convert_ works much like _convert_ does, using the original logic: # in a test file import socket, enum CheckedAddressFamily = enum._old_convert_( enum.IntEnum, 'AddressFamily', 'socket', lambda C: C.isupper() and C.startswith('AF_'), source=_socket, ) test_simple_enum takes a traditional enum and a simple enum and compares the two: # in the REPL or the same module as Color class CheckedColor(Enum): RED = 1 GREEN = 2 BLUE = 3 _test_simple_enum(CheckedColor, Color) _test_simple_enum(CheckedAddressFamily, socket.AddressFamily) Any important differences will raise a TypeError
* bpo-33289: Return RGB triplet of ints instead of floats from ↵Cheryl Sabella2021-01-214-29/+91
| | | | tkinter.colorchooser (GH-6578)
* bpo-42759: Fix equality comparison of Variable and Font in Tkinter (GH-23968)Serhiy Storchaka2020-12-294-11/+24
| | | | Objects which belong to different Tcl interpreters are now always different, even if they have the same name.
* Rename Tkinter tests for widget options (GH-23944)Serhiy Storchaka2020-12-253-210/+212
| | | | Every test for widget option starts now with "test_configure_" to distinguish it from tests for widget commands.
* bpo-35728: Add root parameter to tkinter.font.nametofont() (GH-23885)Desmond Cheong2020-12-252-2/+17
|
* bpo-42721: Improve using simple dialogs without root window (GH-23897)Serhiy Storchaka2020-12-256-24/+135
| | | | | | | | | | | | | | | | | When simple query dialogs (tkinter.simpledialog), message boxes (tkinter.messagebox) or color choose dialog (tkinter.colorchooser) are created without arguments master and parent, and the default root window is not yet created, a new temporary hidden root window will be created automatically. It will not be set as the default root window and will be destroyed right after closing the dialog window. It will help to use these simple dialog windows in programs which do not need other GUI. Previously, message boxes and color chooser created the blank root window and left it after closing the dialog window, and query dialogs just raised an exception. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-15303: Support widgets with boolean value False in Tkinter (GH-23904)Serhiy Storchaka2020-12-257-29/+29
| | | Use `widget is None` instead of checking the boolean value of a widget.
* bpo-42685: Improve placing of simple query windows. (GH-23856)Serhiy Storchaka2020-12-241-35/+34
| | | | | | * If parent is specified and mapped, the query widget is centered at the center of parent. Its position and size can be corrected so that it fits in the virtual root window. * Otherwise it is centered at the center of the screen.
* bpo-42630: Improve error reporting in Tkinter for absent default root (GH-23781)Serhiy Storchaka2020-12-1915-77/+303
| | | | | | | | | | | * 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.
* bpo-19733: Re-enable tests for -image option in Tkinter (GH-23785)Serhiy Storchaka2020-12-162-6/+0
|
* bpo-40219: Lowered ttk LabeledScale dummy (GH-21467)E-Paine2020-12-151-1/+4
|
* bpo-42328: Skip some tests with themes vista and xpnative on Windows 7 ↵Serhiy Storchaka2020-12-031-0/+9
| | | | (GH-23612)