Message373025
| Author |
lekensteyn |
| Recipients |
Leo Singer, Marcel H2, bethard, eli.bendersky, evan_, josh.r, lekensteyn, markgrandi, moritz, naufraghi, palaviv, paul.j3, r.david.murray, sedrubal, serhiy.storchaka |
| Date |
2020年07月05日.10:53:50 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1593946430.6.0.249204120553.issue14156@roundup.psfhosted.org> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|