sys.stdin.read() exits the REPL process when stdin is set to be non-blocking on 3.14
未关闭
还没有人认领这个 Issue。
type-bug
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 35.9k
- PR 合并指标
- PR 指标待抓取
描述
Bug report
Bug description:
import sys
import os
os.set_blocking(sys.stdin.fileno(), False)
sys.stdin.read()
Just a weird side effect I found while ckecking out #109523 on Python 3.14 using the new REPL.
Running the code mentioned in #109523 raises a BlockingIOError and exits the REPL process.
Running the code from a script produces an error that is consistent with the previous report.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
- gh-121689
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
在 Linux 上新的 Python 3.14 REPL 中重现该代码片段,并将其与将相同代码作为脚本运行进行比较。审查 gh-121689 中链接的工作,并验证 BlockingIOError 不再退出 REPL 进程,同时脚本行为仍与早期报告一致。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- cli, operating-systems
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100