python / python/cpython

Add structured version info for tkinter

Open
#157,514 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.16 extension-modules topic-tkinter type-feature
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Feature or enhancement

The version of the Tcl and Tk libraries used for building _tkinter is only available as _tkinter.TCL_VERSION/TK_VERSION (strings with only major and minor, like '8.6') and tkinter.TclVersion/TkVersion (the same as floats). The full patch level is not exposed, although the module uses it (TCL_PATCH_LEVEL), and there is no structured form. The runtime version is available as Misc.info_patchlevel(), which needs a Tcl interpreter.

Add _tkinter.TCL_PATCH_LEVEL and _tkinter.TK_PATCH_LEVEL for the full build-time version strings, and tkinter.TCL_VERSION_INFO and tkinter.TK_VERSION_INFO, named tuples of the same type as returned by info_patchlevel(), with fields major, minor, micro, releaselevel and serial.

Linked PRs
  • gh-157516

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the existing _tkinter.TCL_VERSION/TK_VERSION and tkinter.TclVersion/TkVersion APIs, then compare tkinter.Misc.info_patchlevel() for the tuple shape. Done means exposing the two patch-level constants and two named tuples with major, minor, micro, releaselevel, and serial fields; gh-157516 is already linked.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.