gh-59551: Document the full public API of tkinter#151579
Open
serhiy-storchaka wants to merge 8 commits into
Open
gh-59551: Document the full public API of tkinter#151579serhiy-storchaka wants to merge 8 commits into
serhiy-storchaka wants to merge 8 commits into
Conversation
Replace the previously sparse reference documentation with full coverage of the public API of the tkinter package, written from the Tcl/Tk manual pages, the existing documentation and the module docstrings. * Doc/library/tkinter.rst gains a "Reference" section documenting every public class, method, function and constant of the core module -- the widgets, the Misc, Wm, Pack, Place, Grid, XView and YView mix-ins, the Variable and image classes, the module-level functions and the symbolic constants. * Doc/library/tkinter.ttk.rst, dialog.rst, tkinter.font.rst and the other module pages document their remaining classes, methods and functions. The descriptions are Python-oriented (correct return types -- tuples rather than Tcl lists, booleans, integers, None on cancellation, and so on) and were checked against the Tcl/Tk 9.1 manual pages and the implementation. versionadded, versionchanged and deprecated directives are added for the public API, determined from the git history relative to Python 3.0: the tkinter.ttk module (3.1); the Text, Wm, Menu and Misc methods exposing Tk 8.5 features (3.3); and the many later additions and behavior changes up to 3.15. The Tk version required by features added after Tk 8.6 is noted as well. The bundled Tcl/Tk version is updated to 9.0 and the manual-page links point at the tcl9.0 reference. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Documentation build overview
11 files changed ·
|
Merge alias methods into a single directive with stacked signatures instead of documenting each spelling separately: Font.config/configure, Variable.set/initialize, Variable.trace_variable/trace, and BooleanVar.set/initialize. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nchors Document each alias as a :no-typesetting: directive placed just before its main definition, so the alias keeps an index entry and a reference anchor without rendering a duplicate signature. Each alias is named in the prose of the main method, with the alias spelling as a live link. The common geometry-manager spellings pack(), place() and grid() are kept as visible stacked signatures rather than hidden. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…natures Document the propagate(), pack_propagate() and grid_propagate() query/set methods with separate no-argument and one-argument signatures instead of exposing the internal ['_noarg_'] default placeholder. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reflow the prose added or modified on this branch so that each sentence starts on a new line (semantic line breaks), wrapping long sentences at 79 columns. Only changed paragraphs are touched; tables, literal blocks, lists and definition lists are left as they were. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Use the standard "``wm_X`` is an alias of X" wording for the window-manager methods instead of the bespoke "the wm_-prefixed spelling is an equivalent alias" note. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Undocument the tclobjs_to_py() and setup_master() utility functions, which are internal helpers rather than public API. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Qualify references that did not resolve: the geometry/Frame classes in scrolledtext, Button.invoke in tkinter.rst, and Scrollbar.set, the Widget.configure methods (documented on Misc) and IntVar in ttk. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Replace the previously sparse reference documentation with full coverage of the public API of the tkinter package, written from the Tcl/Tk manual pages, the existing documentation and the module docstrings.
The descriptions are Python-oriented (correct return types -- tuples rather than Tcl lists, booleans, integers, None on cancellation, and so on) and were checked against the Tcl/Tk 9.1 manual pages and the implementation.
versionadded, versionchanged and deprecated directives are added for the public API, determined from the git history relative to Python 3.0: the tkinter.ttk module (3.1); the Text, Wm, Menu and Misc methods exposing Tk 8.5 features (3.3); and the many later additions and behavior changes up to 3.15. The Tk version required by features added after Tk 8.6 is noted as well. The bundled Tcl/Tk version is updated to 9.0 and the manual-page links point at the tcl9.0 reference.