python / python/cpython

Add structured version info for readline

未关闭
#157,485 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

3.16 extension-modules type-feature
主要语言
Python
星标
77.2k
派生
35.9k
PR 合并指标
PR 指标待抓取

描述

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
  • gh-157486

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先检查 readline 现有的私有版本名称,以及 issue 中描述的后端特定行为。完成的标准是:使用所要求的名称和字段公开构建时和运行时的版本信息,同时保留私有名称,并确保 libedit 的值描述其模拟的 API。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
cli
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。