python / python/cpython

`PYTHON_LLTRACE`/`PYTHON_OPT_DEBUG` only reads first character of environment variable

未关闭
#148,638 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

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

描述

Feature or enhancement

Proposal:

The PYTHON_LLTRACE and PYTHON_OPT_DEBUG environment variables are currently parsed by only reading the first character:

lltrace = *python_lltrace - '0';  // '10' becomes 1

This means values like PYTHON_LLTRACE=10 are interpreted as 1 instead of 10.

PR: #148636

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs
  • gh-148636

贡献指南

打开贡献指南

从这里开始

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

调研方向

该 issue 指出了环境变量 PYTHON_LLTRACE 和 PYTHON_OPT_DEBUG 的解析问题,并指向 PR #148636。首先检查该 PR 以及这些变量现有的解析逻辑;当多位数值能够按预期处理且不会使当前行为出现回归时,即视为完成。

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

评估

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

把新 issue 发到你的邮箱

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