This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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 <>
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

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:50lekensteynsetrecipients: + 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:50lekensteynsetmessageid: <>
2020-07-05 10:53:50lekensteynlinkissue14156 messages
2020-07-05 10:53:50lekensteyncreate