Skip to content

gh-86726: Fix and improve tkinter documentation and docstrings#153549

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:gh-86726-doc-fixes
Jul 11, 2026
Merged

gh-86726: Fix and improve tkinter documentation and docstrings#153549
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:gh-86726-doc-fixes

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jul 11, 2026

Copy link
Copy Markdown
Member

Correct inaccurate return-type and option descriptions in the tkinter
reference and add missing module and class docstrings, found while
re-reading the whole tkinter documentation and checking each claim against
Tk 9.1.

  • wm_aspect(), wm_grid(), wm_iconposition() and overrideredirect()
    return None, not an empty string, when no value is set.
  • Fix the return-type note for the messagebox ask*() functions and the
    tkinter.dialog descriptions (Directory is native, Dialog.destroy()
    does nothing, the options have no defaults).
  • Document the ttk OptionMenu/Spinbox replacements, the Treeview
    column separator option and the ttk.OptionMenu direction argument.
  • Add missing module docstrings and fix a few docstring typos.

@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes skip news docs Documentation in the Doc dir labels Jul 11, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Jul 11, 2026
Correct inaccurate return-type and option descriptions in the tkinter
reference, and add missing module and class docstrings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) July 11, 2026 09:15
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33542291 | 📁 Comparing 4362352 against main (d52cfd2)

  🔍 Preview build  

4 files changed
± library/dialog.html
± library/tkinter.html
± library/tkinter.messagebox.html
± library/tkinter.ttk.html

@serhiy-storchaka serhiy-storchaka merged commit 77cb756 into python:main Jul 11, 2026
51 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Jul 11, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Jul 11, 2026

Copy link
Copy Markdown

GH-153551 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jul 11, 2026
@miss-islington-app

Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 77cb7560c07feed0d5b144c0c1735e1620c96f51 3.13

@bedevere-app

bedevere-app Bot commented Jul 11, 2026

Copy link
Copy Markdown

GH-153552 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Jul 11, 2026
@serhiy-storchaka serhiy-storchaka removed their assignment Jul 11, 2026
@serhiy-storchaka serhiy-storchaka deleted the gh-86726-doc-fixes branch July 11, 2026 09:55
@bedevere-app

bedevere-app Bot commented Jul 11, 2026

Copy link
Copy Markdown

GH-153557 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Jul 11, 2026
serhiy-storchaka added a commit that referenced this pull request Jul 11, 2026
…GH-153549) (GH-153552)

Correct inaccurate return-type and option descriptions in the tkinter
reference, and add missing module and class docstrings.
(cherry picked from commit 77cb756)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
serhiy-storchaka added a commit that referenced this pull request Jul 11, 2026
…GH-153549) (GH-153551)

Correct inaccurate return-type and option descriptions in the tkinter
reference, and add missing module and class docstrings.
(cherry picked from commit 77cb756)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
serhiy-storchaka added a commit that referenced this pull request Jul 11, 2026
…GH-153549) (GH-153557)

Correct inaccurate return-type and option descriptions in the tkinter
reference, and add missing module and class docstrings.
(cherry picked from commit 77cb756)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Abhi210 pushed a commit to Abhi210/cpython that referenced this pull request Jul 11, 2026
…ythonGH-153549)

Correct inaccurate return-type and option descriptions in the tkinter
reference, and add missing module and class docstrings.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
serhiy-storchaka added a commit that referenced this pull request Jul 15, 2026
…ation (GH-153647)

Refresh the narrative "Tkinter life preserver" and "Handy reference"
sections to match the overhauled reference (gh-86726 and gh-153549).

* Rework "The packer" into a general "Geometry management" section
  covering grid, pack and place, and cross-link it with the Grid, Pack
  and Place reference classes.
* Rework "The window manager" and "Coupling widget variables", replacing
  the dated App(Frame) examples with direct Tk() and ttk examples.
* Replace page-number citations to Ousterhout's book with links to the
  relevant Tk man pages.
* Modernize the tkinter.ttk front matter and its Tcl/Tk links, and add
  cross-references between the two documents.
* Reconcile the "Packer options" and "Tk option data types" lists with
  the reference, and fill in the empty Entry index list.
* Fix the malformed target-selection list in tkinter.dnd.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
serhiy-storchaka added a commit that referenced this pull request Jul 15, 2026
…ocumentation (GH-153647) (GH-153774)

Refresh the narrative "Tkinter life preserver" and "Handy reference"
sections to match the overhauled reference (gh-86726 and gh-153549).

* Rework "The packer" into a general "Geometry management" section
  covering grid, pack and place, and cross-link it with the Grid, Pack
  and Place reference classes.
* Rework "The window manager" and "Coupling widget variables", replacing
  the dated App(Frame) examples with direct Tk() and ttk examples.
* Replace page-number citations to Ousterhout's book with links to the
  relevant Tk man pages.
* Modernize the tkinter.ttk front matter and its Tcl/Tk links, and add
  cross-references between the two documents.
* Reconcile the "Packer options" and "Tk option data types" lists with
  the reference, and fill in the empty Entry index list.
* Fix the malformed target-selection list in tkinter.dnd.
(cherry picked from commit 93beea7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
serhiy-storchaka added a commit that referenced this pull request Jul 15, 2026
…ocumentation (GH-153647) (GH-153773)

Refresh the narrative "Tkinter life preserver" and "Handy reference"
sections to match the overhauled reference (gh-86726 and gh-153549).

* Rework "The packer" into a general "Geometry management" section
  covering grid, pack and place, and cross-link it with the Grid, Pack
  and Place reference classes.
* Rework "The window manager" and "Coupling widget variables", replacing
  the dated App(Frame) examples with direct Tk() and ttk examples.
* Replace page-number citations to Ousterhout's book with links to the
  relevant Tk man pages.
* Modernize the tkinter.ttk front matter and its Tcl/Tk links, and add
  cross-references between the two documents.
* Reconcile the "Packer options" and "Tk option data types" lists with
  the reference, and fill in the empty Entry index list.
* Fix the malformed target-selection list in tkinter.dnd.
(cherry picked from commit 93beea7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
serhiy-storchaka added a commit that referenced this pull request Jul 15, 2026
…ocumentation (GH-153647) (GH-153775)

Refresh the narrative "Tkinter life preserver" and "Handy reference"
sections to match the overhauled reference (gh-86726 and gh-153549).

* Rework "The packer" into a general "Geometry management" section
  covering grid, pack and place, and cross-link it with the Grid, Pack
  and Place reference classes.
* Rework "The window manager" and "Coupling widget variables", replacing
  the dated App(Frame) examples with direct Tk() and ttk examples.
* Replace page-number citations to Ousterhout's book with links to the
  relevant Tk man pages.
* Modernize the tkinter.ttk front matter and its Tcl/Tk links, and add
  cross-references between the two documents.
* Reconcile the "Packer options" and "Tk option data types" lists with
  the reference, and fill in the empty Entry index list.
* Fix the malformed target-selection list in tkinter.dnd.


(cherry picked from commit 93beea7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant