Peter Wu <pe...@lekensteyn.nl> added the comment:
I just ran into this issue on Linux when piping a binary file to stdin resulted in a UnicodeDecodeError while trying to read a byte from the stream. Passing /dev/stdin is a workaround that does not require modifications to an application. As for the proposed PR 13165, I'd suggest to gracefully fallback to normal stdout/stdin if the buffer is not available. That approach is also followed in the fileinput module, and takes care of the note for library developers in the documentation at https://docs.python.org/3/library/sys.html#sys.stdin Not feeling particular strong about the graceful handling, but I hope that the test code can be simplified in that case. ---------- nosy: +lekensteyn _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue14156> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com