Message373025
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. |
|
Date |
User |
Action |
Args |
2020-07-05 10:53:50 | lekensteyn | set | recipients:
+ lekensteyn, bethard, naufraghi, r.david.murray, eli.bendersky, paul.j3, serhiy.storchaka, moritz, markgrandi, josh.r, palaviv, evan_, sedrubal, Marcel H2, Leo Singer |
2020-07-05 10:53:50 | lekensteyn | set | messageid: <1593946430.6.0.249204120553.issue14156@roundup.psfhosted.org> |
2020-07-05 10:53:50 | lekensteyn | link | issue14156 messages |
2020-07-05 10:53:50 | lekensteyn | create | |
|