From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Thu, 18 Jun 2026 14:44:51 +0000 (+0200) Subject: [3.15] gh-86726: Fix the documented return type of tkinter info_patchlevel() (GH... X-Git-Tag: v3.15.0b3~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=821e97b999e2f1857921cf944adf86c815d1a599;p=thirdparty%2FPython%2Fcpython.git [3.15] gh-86726: Fix the documented return type of tkinter info_patchlevel() (GH-151655) (GH-151658) It returns a sys.version_info-like named tuple, not a string. (cherry picked from commit 3cd02a1c2da023974464fd1155982a16474f331b) Co-authored-by: Serhiy Storchaka Co-authored-by: Claude Opus 4.8 (1M context) --- diff --git a/Doc/library/tkinter.rst b/Doc/library/tkinter.rst index 5c40eadcf49c..8507656e50fa 100644 --- a/Doc/library/tkinter.rst +++ b/Doc/library/tkinter.rst @@ -2333,7 +2333,13 @@ Base and mixin classes .. method:: info_patchlevel() - Return the Tcl/Tk patch level as a string, for example ``'9.1.0'``. + 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