cpython icon indicating copy to clipboard operation
cpython copied to clipboard

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

Open IljaManakov opened this issue 1 year ago • 0 comments

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

IljaManakov avatar Jul 13 '24 08:07 IljaManakov