Simplify Windows write I/O around consoles on Windows 8+
還沒有人認領這個 Issue。
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 35.9k
- PR 合併指標
- PR 指標待擷取
描述
Feature or enhancement
Proposal:
In bpo-11395 from 2011, Windows Python needed to check on every write if a write was to a tty / console object and limit the size of the write to avoid an OS error on write. With Windows 8 and above, the Windows subsystem has been updated and this check is no longer necessary. It is also not necessary to split the write into smaller pieces (which resulted in gh-110913 and gh-82052).
Based on PEP 11, the last Windows 8 support ended in 2023, so the isatty + limited write size is no longer needed on any currently supported Windows platform (Pipes are still limited write size).
That large writes work is tested in test_os, test_write_windows_console
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
https://github.com/python/cpython/issues/55604#issuecomment-1093537612
Linked PRs
- gh-121941
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先從 test_os 和 test_write_windows_console 中 Windows 主控台寫入的涵蓋範圍開始,然後追蹤相關的 Windows 寫入路徑。在受支援的 Windows 版本上,主控台寫入不再需要過時的檢查或分割、管線寫入限制維持不變,且現有的大型寫入測試通過後,此變更即完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- operating-systems
- Issue 類型
- 功能
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100