python / python/cpython

sys.stdin.read() exits the REPL process when stdin is set to be non-blocking on 3.14

オープン
#121,662 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Linux 上の新しい Python 3.14 REPL でスニペットを再現し、同じコードをスクリプトとして実行した場合と比較してください。gh-121689 にリンクされた作業を確認し、BlockingIOError が REPL プロセスを終了させなくなっている一方で、スクリプトの動作が以前の報告と一貫していることを検証してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
cli, operating-systems
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。