]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-86726: Fix the documented return type of tkinter info_patchlevel() (GH...
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 18 Jun 2026 14:44:23 +0000 (17:44 +0300)
committerGitHub <noreply@github.com>
Thu, 18 Jun 2026 14:44:23 +0000 (14:44 +0000)
It returns a sys.version_info-like named tuple, not a string.
(cherry picked from commit 3cd02a1c2da023974464fd1155982a16474f331b)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Doc/library/tkinter.rst

index fcb12338ed5321a612fc5da91ebce6c13a8b21a8..237c21a7bb0c32fcb48fe1c3bbf7036b9190f0ba 100644 (file)
@@ -2299,7 +2299,13 @@ Base and mixin classes
 
    .. method:: info_patchlevel()
 
-      Return the Tcl/Tk patch level as a string, for example ``'8.6.15'``.
+      Return the Tcl/Tk patch level as a named tuple with the same five fields
+      as :data:`sys.version_info`: *major*, *minor*, *micro*, *releaselevel*
+      and *serial*.
+      *releaselevel* is ``'alpha'``, ``'beta'`` or ``'final'``.
+      Converting it to a string gives the version in the usual Tcl/Tk notation,
+      for example ``'9.0.3'`` for a final release or ``'9.1b2'`` for a
+      pre-release.
 
       .. versionadded:: 3.11