Skip to content

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

Open
@IljaManakov

Description

@IljaManakov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions