Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
IljaManakov opened this issue Jul 13, 2024 · 0 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@IljaManakov
Copy link

IljaManakov commented Jul 13, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant