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 alexandre.vassalotti
Recipients alexandre.vassalotti, gregory.p.smith, loewis, pitrou
Date 2008-07-23.03:02:27
SpamBayes Score 0.000164604
Marked as misclassified No
Message-id <>
Antoine wrote:
> Le lundi 21 juillet 2008 à 21:18 +0000, Martin v. Löwis a écrit :
> > IIUC, a read of the full requested size would achieve exactly that: 
on a
> > non-blocking stream (IIUC), a read will always return
> > min(bytes_available, bytes_requested).
> Hmm, it seems logical indeed... Alexandre, do you have other 
> on the subject?

Martin is right. However, I don't how Python handle the case where 
bytes_available is zero (in C, an error value is returned and errno is 

When I revised the patch I had a weak understanding of nonblocking I/O. 
I thought the "exponential" reads were for nonblocking I/O, but I see 
now that is non-sense.

I am not sure, but I think Martin is also right about the second loop. 
The max() call should be changed back to "max(self.buffer_size, n))", 
like in the 2nd patch.
Date User Action Args
2008-07-23 03:02:31alexandre.vassalottisetspambayes_score: 0.000164604 -> 0.000164604
recipients: + alexandre.vassalotti, loewis, gregory.p.smith, pitrou
2008-07-23 03:02:31alexandre.vassalottisetspambayes_score: 0.000164604 -> 0.000164604
messageid: <>
2008-07-23 03:02:30alexandre.vassalottilinkissue2523 messages
2008-07-23 03:02:28alexandre.vassalotticreate