Commit graph

19 commits

Author SHA1 Message Date
Miss Islington (bot)
4548ae7e65
[3.12] gh-113951: Tkinter: "tag_unbind(tag, sequence, funcid)" now only unbinds "funcid" (GH-113955) (GH-114997)
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 7e42fddf60)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-02-04 16:43:56 +00:00
Miss Islington (bot)
7530c612d1
[3.12] gh-113877: Fix Tkinter method winfo_pathname() on 64-bit Windows (GH-113900) (GH-113901)
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 1b7e0024a1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-01-10 10:53:27 +00:00
Miss Islington (bot)
f189bd3e83
[3.12] gh-75666: Tkinter: "unbind(sequence, funcid)" now only unbinds "funcid" (GH-111322) (GH-112802)
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 cc7e45cc57)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: GiovanniL <13402461+GiovaLomba@users.noreply.github.com>
2023-12-06 15:12:37 +00:00
Miss Islington (bot)
df531912a7
[3.12] gh-75666: Tkinter: add tests for binding (GH-111202) (GH-111255)
(cherry picked from commit 9bb202a1a9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-24 14:53:21 +03:00
Miss Islington (bot)
9a62322174
[3.12] gh-107705: Fix file leak in test_tkinter in the C locale (GH-110507) (GH-110857)
(cherry picked from commit ca0f3d858d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-14 06:43:59 +00:00
Miss Islington (bot)
91d935b47b
[3.12] gh-104496: Use correct Tcl or Tk version in Tkinter tests (GH-107688) (#107709)
gh-104496: Use correct Tcl or Tk version in Tkinter tests (GH-107688)

In future Tcl and Tk versions can be desynchronized.
(cherry picked from commit 3c8e8f3cee)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-16 14:32:04 +02:00
Miss Islington (bot)
6fd572f3b3
[3.12] gh-100814: Fix exception for invalid callable value of Tkinter image option (GH-107692) (#107722)
gh-100814: Fix exception for invalid callable value of Tkinter image option (GH-107692)

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 50e3cc9748)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-08-16 14:30:31 +02:00
Miss Islington (bot)
7f04a1546f
[3.12] gh-105077: Fix test_tkinter refleak checking (GH-105078) (GH-105079)
Use specific symbols from `test.support` to avoid having `support`
overwritten by `test_tkinter`'s own `support` submodule.
(cherry picked from commit 5454db4ace)
2023-05-29 23:25:52 -05:00
Miss Islington (bot)
5426ff1476
[3.12] gh-104497: Make tkinter test pass with tk 8.7 (GH-104789) (#105028)
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>
2023-05-27 17:51:05 -04:00
Serhiy Storchaka
9bc80dac47
gh-94473: Flatten arguments in tkinter.Canvas.coords() (GH-98479)
It now accepts not only "x1, y1, x2, y2, ..." and "[x1, y1, x2, y2, ...]",
but also "(x1, y1), (x2, y2), ..." and "[(x1, y1), (x2, y2), ...]".
2023-05-22 11:54:41 +03:00
Christopher Chavez
fdafdc235e
gh-104461: Run tkinter test_configure_screen on X11 only (GH-104462) 2023-05-15 22:22:53 -04:00
Christopher Chavez
3cba61f111
gh-104494: Update certain Tkinter pack/place tests for Tk 8.7 errors (#104495)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-05-15 04:54:41 -04:00
Christopher Chavez
f0ed293f6a
gh-103685: Fix tkinter.Menu.index() for Tk 8.7 (#103686)
---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2023-04-23 21:31:44 -04:00
Alex Waygood
401d7a7f00
gh-102515: Remove unused imports in the Lib/ directory (#102516) 2023-03-08 11:45:38 +00:00
Serhiy Storchaka
ff173ed2f6
Add more tkinter.Canvas tests (GH-98475)
It is a prerequisite for #94473. Add tests for the coords() method and
for creation of some Canvas items.
2022-10-20 13:43:12 +03:00
Serhiy Storchaka
e4ec8de6fa
gh-97928: Fix handling options starting with "-" in tkinter.Text.count() (GH-98436)
Previously they were silently ignored. Now they are errors.
2022-10-19 12:30:14 +03:00
Serhiy Storchaka
1b684c8f5f
gh-97928: Add tests for tkinter.Text.count() (GH-98269) 2022-10-19 09:17:45 +03:00
Serhiy Storchaka
adbed2d542
gh-73588: Fix generation of the default name of tkinter.Checkbutton. (GH-97547)
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.
2022-09-27 14:05:05 +03:00
Victor Stinner
c1fb12e5af
gh-54781: Move Lib/tkinter/test/test_ttk/ to Lib/test/test_ttk/ (#94070)
* Move Lib/tkinter/test/test_tkinter/ to Lib/test/test_tkinter/.
* Move Lib/tkinter/test/test_ttk/ to Lib/test/test_ttk/.
* Add Lib/test/test_ttk/__init__.py based on test_ttk_guionly.py.
* Add Lib/test/test_tkinter/__init__.py
* Remove old Lib/test/test_tk.py.
* Remove old Lib/test/test_ttk_guionly.py.
* Add __main__ sub-modules.
* Update imports and update references to rename files.
2022-06-22 22:23:37 +02:00