Handling `sys.stdin.read()` in Non-Blocking Mode

Overall I agree. Including the use of BlockingIOError for this. That actually makes sense as opposed to the “this case was never considered” smell of the existing TypeError.

Next steps: We need a PR implementing this. The existing Draft PR can be changed to raise rather than return None, or a new draft PR can be opened and the old one closed.

Note that this is TextIOWrapper behavior, it won’t be sys.stdin specific.

Let’s keep further discussion for the specific implementation on the issue itself.

3 Likes