Message147009
No one has suggested raising BlockingIOError and DISCARDING the data when a partial read has occurred. The docs seem to imply that the partially read data should be returned since they only say that BlockingIOError should be raised if there is NOTHING to read. Clearly this should all be spelt out properly.
That leaves the question of whether, when there is NOTHING to read, BlockingIOError should be raised (as the docs say) or None should be returned (as is done now). I don't mind either way as long as the docs match reality.
The part which really needs addressing is partial writes. Currently, if a write fails with EAGAIN then IOError is raised and there is no way to work out how much data was written/buffered. The docs say that BlockingIOError should be raised with the e.args[2] set to indicate the number of bytes written/buffered. This at least should be fixed.
I will work on a patch. |
|
Date |
User |
Action |
Args |
2011-11-04 15:04:07 | sbt | set | recipients:
+ sbt, pitrou, benjamin.peterson, stutzbach, neologix, petri.lehtinen |
2011-11-04 15:04:07 | sbt | set | messageid: <1320419047.25.0.854178737094.issue13322@psf.upfronthosting.co.za> |
2011-11-04 15:04:06 | sbt | link | issue13322 messages |
2011-11-04 15:04:06 | sbt | create | |
|