Skip to content

Add structured version info for readline #157485

Description

@serhiy-storchaka

Feature or enhancement

readline exposes the version of the readline library only under private names: _READLINE_VERSION (RL_READLINE_VERSION, an int like 0x0803), _READLINE_RUNTIME_VERSION (rl_readline_version, an int) and _READLINE_LIBRARY_VERSION (rl_library_version, a string like '8.3'), added for tests.

Add readline.READLINE_VERSION_INFO for the build-time version and readline.readline_version_info for the runtime version, named tuples with major and minor fields (readline has no third component), and readline.readline_version for the runtime version string. The private names are kept for backward compatibility.

With the libedit backend (readline.backend == 'editline', i.e. the module was built against libedit's readline emulation), these describe the emulated readline API (4.2, 'EditLine wrapper'), not libedit itself, which has no meaningful version API.

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.16new features, bugs and security fixesextension-modulesC modules in the Modules dirtype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions