Author gregory.p.smith
Recipients amaury.forgeotdarc, beazley, dabeaz, gregory.p.smith, loewis, ned.deily, pitrou, rosslagerwall, roysmith
Date 2011-01-13.17:47:13
SpamBayes Score 3.0315e-09
Marked as misclassified No
Message-id <1294940851.48.0.259636610004.issue7322@psf.upfronthosting.co.za>
In-reply-to
Content
"""Generally there is no guarantee that a buffered object works "properly" when the raw IO object raises some exception intermittently"""

I disagree.  EINTR is a classic case of this and is something that buffering IO layers deal with all the time.  (readline is just one example of a buffering io layer)

if there is a timeout and we can't determine if there is enough data to return for readline, we should buffer it and not return.

maybe this means we need to disallow readline() with timeouts on unbuffered sockets since we can't determine if data will need to be buffered or not due to such a condition in advance.

The normal behavior for code calling readline() on a socket with a timeout is likely going to be to close it.  Anything else does not make much sense.  (someone may try, but really they're writing their I/O code wrong if they are using a socket timeout a poor form of task switching ;)
History
Date User Action Args
2011-01-13 17:47:31gregory.p.smithsetrecipients: + gregory.p.smith, loewis, beazley, amaury.forgeotdarc, roysmith, pitrou, ned.deily, dabeaz, rosslagerwall
2011-01-13 17:47:31gregory.p.smithsetmessageid: <1294940851.48.0.259636610004.issue7322@psf.upfronthosting.co.za>
2011-01-13 17:47:14gregory.p.smithlinkissue7322 messages
2011-01-13 17:47:13gregory.p.smithcreate