Basic REPL hangs when ioctls can't be written to TTY
未關閉
還沒有人認領這個 Issue。
stdlib
topic-repl
type-bug
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 36k
- PR 合併指標
- PR 指標待擷取
描述
This is related to #134466, but is regarding the basic REPL.
If you remove the ability to write ioctls to tty stdio, for example on macOS by doing
PYTHON_BASIC_REPL=1 sandbox-exec -p '(version 1) (import "system.sb") (allow process-exec) (allow file-read* (subpath "/"))' python3.13
then the REPL never shows the prompt and doesn't allow interaction, but hangs forever.
Linked PRs
- gh-139989
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先使用 PYTHON_BASIC_REPL=1 執行提供的 macOS 沙箱命令,並觀察 basic REPL 始終不顯示提示字元。追蹤 basic REPL 的 TTY ioctl 處理,並與相關的 issue #134466 比較;當 ioctl 寫入無法使用時 REPL 仍保持互動狀態,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- cli
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100