Skip to content

Add method for getting the exact version of the Tcl library as a named tuple #91827

Closed
@serhiy-storchaka

Description

@serhiy-storchaka

Global variables TkVersion and TclVersion contain the version as a float, e.g. 8.6. There are several issues with this:

  1. It is a float. Therefore it cannot work with minor version larger than 9.
  2. It does not contain important information about serial (bugfix) number and release level (alpha/beta/final). New features were added in Tcl/Tk with changing the third version number. The bugfix number can also affect workaround for bugs.
  3. It gives the version of the Tcl headers with which tkinter was built. But if Tcl versions are binary compatible, the real dynamic version can be different.

More detailed info can be retrieved by Tcl command info patchlevel. But the interface of calling raw Tcl commands is not official, and the result is a string, which is hard to compare as version.

I propose to add new method info_patchlevel() which returns the exact version of the Tcl library as a named tuple similar to sys.version_info.

The question is whether we need a global variable representing the static version as a named tuple (it is known at compile time) and what should be its name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions