Skip to content

gh-59551: Document the full public API of tkinter#151579

Open
serhiy-storchaka wants to merge 8 commits into
python:mainfrom
serhiy-storchaka:tk-docs
Open

gh-59551: Document the full public API of tkinter#151579
serhiy-storchaka wants to merge 8 commits into
python:mainfrom
serhiy-storchaka:tk-docs

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jun 17, 2026

Copy link
Copy Markdown
Member

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.

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>
@serhiy-storchaka serhiy-storchaka added docs Documentation in the Doc dir needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jun 17, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Jun 17, 2026
@read-the-docs-community

read-the-docs-community Bot commented Jun 17, 2026

Copy link
Copy Markdown

serhiy-storchaka and others added 7 commits June 17, 2026 10:11
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review docs Documentation in the Doc dir needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant