homepage

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 sbt
Recipients benjamin.peterson, neologix, petri.lehtinen, pitrou, sbt, stutzbach
Date 2011年11月04日.15:48:19
SpamBayes Score 3.1092048e-05
Marked as misclassified No
Message-id <1320421700.71.0.122839828675.issue13322@psf.upfronthosting.co.za>
In-reply-to
Content
The third arg of BlockingIOError is used in two quite different ways.
In write(s) it indicates the number of bytes of s which have been "consumed" (ie written to the raw file or buffered).
But in flush() and flush_unlocked() (in _pyio) it indicates the number of bytes from the internal buffer which have been written to the raw file.
I think this explains the following comment in write():
 # We're full, so let's pre-flush the buffer
 try:
 self._flush_unlocked()
 except BlockingIOError as e:
 # We can't accept anything else.
 # XXX Why not just let the exception pass through?
 raise BlockingIOError(e.errno, e.strerror, 0)
I don't think flush() should try to tell us how many bytes were flushed: we only need to know whether we need to try again.
History
Date User Action Args
2011年11月04日 15:48:20sbtsetrecipients: + sbt, pitrou, benjamin.peterson, stutzbach, neologix, petri.lehtinen
2011年11月04日 15:48:20sbtsetmessageid: <1320421700.71.0.122839828675.issue13322@psf.upfronthosting.co.za>
2011年11月04日 15:48:20sbtlinkissue13322 messages
2011年11月04日 15:48:19sbtcreate

AltStyle によって変換されたページ (->オリジナル) /