Line-wrapped syntax highlighting in Python shell spills over into program output
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 35.9k
- PR 合并指标
- PR 指标待抓取
描述
Bug report
Bug description:
As shown here, when I make the input long enough that the range gets wrapped with a backtick, all subsequent lines until the next command prompt become the same cyan as the text of range.
Tangentially, is there any way to have Python itself stop doing this when the VScode terminal already did it for me in a way I find preferable (since it doesn't insert line-breaks into long one-liners copied from the shell)?
issue 140334 is similar, but this affects the shell, not just IDLE.
CPython versions tested on:
3.14
Operating systems tested on:
macOS, in both VScode and the terminal.
Linked PRs
- gh-152108
- gh-153029
- gh-154402
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用 macOS 终端和 VS Code 在 Python 3.14 中重现包装后的输入,然后将行为与 issue 140334 进行比较。跟踪 Python shell 对语法高亮的处理,并验证包装后的命令执行后,程序输出不再继承输入颜色;关联的 PR gh-152108、gh-153029 和 gh-154402 表明相关工作已经在进行中。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100