summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter
Commit message (Collapse)AuthorAgeFilesLines
* [3.10] bpo-44559: [Enum] revert enum module to 3.9 (GH-27010)Ethan Furman2021-07-042-46/+3
| | | * [Enum] revert enum module to 3.9
* bpo-44404: tkinter `after` support callable classes (GH-26812)Miss Islington (bot)2021-06-272-1/+12
| | | | | (cherry picked from commit e9c8f784fa13ea3a51df3b72a498a3896ec9e768) Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
* bpo-41730: Show deprecation warnings for tkinter.tix (GH-22186)Miss Islington (bot)2021-05-071-1/+8
| | | | | | | Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com> Co-authored-by: Zachary Ware <zach@python.org> (cherry picked from commit 4a2d98a1e98de25c5114d11fcb0f9fedbb057e51) Co-authored-by: wyz23x2 <52805709+wyz23x2@users.noreply.github.com>
* 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)
* bpo-42142: Try to fix timeouts in ttk tests (GH-23474)Serhiy Storchaka2020-11-302-19/+7
| | | | | Instead of using wait_visibility() which waits event <VisibilityNotify> in dead loop use update() which should proceed all queued events.
* bpo-42370: Check element before making mouse click in ttk tests (GH-23491)Serhiy Storchaka2020-11-241-3/+11
|
* bpo-42328: Fix tkinter.ttk.Style.map(). (GH-23300)Serhiy Storchaka2020-11-223-28/+107
| | | | | | | The function accepts now the representation of the default state as empty sequence (as returned by Style.map()). The structure of the result is now the same on all platform and does not depend on the value of wantobjects.
* bpo-41876: Overload __repr__ for tkinter Font objects (GH-22450)Anatoliy Platonov2020-10-142-0/+10
|
* bpo-41831: Restore str implementation of __str__ in tkinter.EventType (GH-22355)Serhiy Storchaka2020-10-091-3/+2
|
* bpo-41831: Add tests for tkinter.Event.__repr__ (GH-22354)Serhiy Storchaka2020-10-091-0/+48
|
* bpo-41306: Allow scale value to not be rounded (GH-21715)E-Paine2020-10-081-1/+2
| | | | | | | 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](https://github.com/tcltk/tk/commit/591f68cb382525b72664c6fecaab87742b6cc87a) and means that the arguments listed above are rounded relative to the value of `from`. However, when rounding the `from` argument ([line 623](https://github.com/tcltk/tk/blob/591f68cb382525b72664c6fecaab87742b6cc87a/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
* bpo-41817: use new StrEnum to ensure all members are strings (GH-22348)Ethan Furman2020-09-221-7/+7
| | | * use new StrEnum to ensure all members are strings
* bpo-40275: Use new test.support helper submodules in tests (GH-21743)Hai Shi2020-08-062-6/+8
|
* bpo-41384: Raise TclError in tkinter.OptionMenu (GH-21601)Akuli2020-07-272-1/+5
| | | | | ... when an unknown option is passed. TypeError was being raised because a 2to3 fix was missing. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-39152: add missing ttk.Scale.configure return value (GH-17815)Terry Jan Reedy2020-01-052-11/+7
| | | | tkinter.ttk.Scale().configure([name]) now returns a configuration tuple for name or a list thereof for all options. Based on patch Giovanni Lombardo.
* bpo-39136: Fixed typos (GH-17720)Gurupad Hegde2019-12-281-2/+2
| | | | | funtion -> function; configuraton -> configuration; defintitions -> definitions; focusses -> focuses; necesarily -> necessarily; follwing -> following; Excape -> Escape,
* bpo-38738: Fix formatting of True and False. (GH-17083)Serhiy Storchaka2019-11-121-2/+2
| | | | | | | | | * "Return true/false" is replaced with "Return ``True``/``False``" if the function actually returns a bool. * Fixed formatting of some True and False literals (now in monospace). * Replaced "True/False" with "true/false" if it can be not only bool. * Replaced some 1/0 with True/False if it corresponds the code. * "Returns <bool>" is replaced with "Return <bool>".
* bpo-13153: Use OS native encoding for converting between Python and Tcl. ↵Serhiy Storchaka2019-10-042-10/+25
| | | | | | | | | | | | | (GH-16545) On Windows use UTF-16 (or UTF-32 for 32-bit Tcl_UniChar) with the "surrogatepass" error handler for converting to/from Tcl Unicode objects. On Linux use UTF-8 with the "surrogateescape" error handler for converting to/from Tcl String objects. Converting strings from Tcl to Python and back now never fails (except MemoryError).
* bpo-15999: Clean up of handling boolean arguments. (GH-15610)Serhiy Storchaka2019-09-011-3/+3
| | | | | | * Use the 'p' format unit instead of manually called PyObject_IsTrue(). * Pass boolean value instead 0/1 integers to functions that needs boolean. * Convert some arguments to boolean only once.
* Fix typos mostly in comments, docs and test names (GH-15209)Min ho Kim2019-08-301-1/+1
|
* bpo-37685: Fixed __eq__, __lt__ etc implementations in some classes. (GH-14952)Serhiy Storchaka2019-08-084-5/+17
| | | | They now return NotImplemented for unsupported type of the other operand.
* bpo-29446: tkinter 'import *' only imports what it should (GH-14864)Flavian Hautbois2019-07-2610-15/+50
| | | | Add __all__ to tkinter.__init__ and submodules. Replace 'import *' with explicit imports in some submodules.
* bpo-25451: Add transparency methods to tkinter.PhotoImage. (GH-10406)Zackery Spytz2019-04-052-0/+18
|
* bpo-27313: Avoid test_ttk_guionly ComboboxTest fail with macOS Cocoa Tk ↵Ned Deily2019-02-241-1/+6
| | | | (GH-12011)
* Fix yet one error in checking Tcl version. (GH-10189)Serhiy Storchaka2018-10-281-1/+1
|
* Fix checking for bugfix Tcl version. (GH-10185)Serhiy Storchaka2018-10-281-1/+1
|
* bpo-34936: Fix TclError in tkinter.Spinbox.selection_element(). (GH-9760)Juliette Monsel2018-10-182-5/+12
|
* bpo-23831: Add moveto method to the tkinter.Canvas widget. (GH-9768)Juliette Monsel2018-10-122-0/+32
|
* bpo-34964: Make Tkinter sources more readable by adding blank lines. (GH-9822)Serhiy Storchaka2018-10-128-9/+565
|
* bpo-34829: Add missing selection_ methods to the Tkinter Spinbox. (GH-9617)Juliette Monsel2018-10-082-0/+68
| | | | | Implement the methods selection_from(), selection_range(), selection_present() and selection_to() for Tkinter Spinbox.
* bpo-34189: Fix checking for bugfix Tcl version. (GH-8397)Serhiy Storchaka2018-07-222-4/+14
|
* bpo-34189: Add simple tests for new Tk widget options. (GH-8396)Serhiy Storchaka2018-07-221-2/+25
|
* bpo-33974: Fix passing special characters to ttk widgets. (GH-7986)Serhiy Storchaka2018-06-301-1/+4
| | | | Fix passing lists and tuples of strings containing special characters '"', '\\', '{', '}' and '\n' as options to tkinter.ttk widgets.
* bpo-33283: Mention PNG as a supported format by Tcl/Tk. (GH-6479)Andrés Delfino2018-04-171-2/+2
|
* bpo-33096: Fix ttk.Treeview.insert. (GH-6228)Garvit Khatri2018-03-262-1/+10
| | | | | Allow ttk.Treeview.insert to insert iid that has a false boolean value. Note iid=0 and iid=False would be same.
* bpo-32857: Raise error when tkinter after_cancel() is called with None. ↵Cheryl Sabella2018-03-042-3/+114
| | | | (GH-5701)