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 pavlix
Recipients Dolda2000, benjamin.peterson, cagney, hynek, martin.panter, pavlix, pitrou, python-dev, r.david.murray, serhiy.storchaka, stutzbach
Date 2020-04-10.11:37:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1586518676.07.0.99745318358.issue20074@roundup.psfhosted.org>
In-reply-to
Content
Okay, let me help the situation a bit. The “workaround” of using `buffering=0` works perfect with `rb+` and `wb+` and I'm pretty sure I used this in the past. I don't know how well this is documented.

I would usually need to disable buffering for any real-time binary communication anyway, so for me the workaround is reasonable. As for buffered I/O and `r+`/`b+` where you cannot disable buffering, I don't know.

It would be useful to have a good reason behind the limitation of Python and have it documented, or have the limitation lifted if there's none, so this issue can be closed.

Could anyone please explain why binary streams default to buffered I/O in the first place? Does it make any sense or it's just historical cruft?
History
Date User Action Args
2020-04-10 11:37:56pavlixsetrecipients: + pavlix, pitrou, benjamin.peterson, stutzbach, r.david.murray, python-dev, hynek, martin.panter, serhiy.storchaka, Dolda2000, cagney
2020-04-10 11:37:56pavlixsetmessageid: <1586518676.07.0.99745318358.issue20074@roundup.psfhosted.org>
2020-04-10 11:37:56pavlixlinkissue20074 messages
2020-04-10 11:37:55pavlixcreate