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 neologix
Recipients benjamin.peterson, neologix, petri.lehtinen, pitrou, sbt, stutzbach
Date 2011-11-04.08:24:29
SpamBayes Score 2.707842e-07
Marked as misclassified No
Message-id <1320395070.26.0.825412055288.issue13322@psf.upfronthosting.co.za>
In-reply-to
Content
> This is a hairy issue

Indeed.

Performing partial read/write may sound imperfect, but using buffered I/O around non-blockind FD is definitely not a good idea.
Also, the advantage of the current approach is that at least, no data is ever lost (and changing the behavior to raise a BlockingIOError might break some code out there in the wild).

Note that Java's BufferedInputStream and ReadableByteChannel also return partial reads.

So I'm somewhat inclined to keep the current behavior (it would however probably be a good idea to update the documentation to warn about this limitation, though).
History
Date User Action Args
2011-11-04 08:24:30neologixsetrecipients: + neologix, pitrou, benjamin.peterson, stutzbach, sbt, petri.lehtinen
2011-11-04 08:24:30neologixsetmessageid: <1320395070.26.0.825412055288.issue13322@psf.upfronthosting.co.za>
2011-11-04 08:24:29neologixlinkissue13322 messages
2011-11-04 08:24:29neologixcreate