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 Justin.Cappos
Recipients Justin.Cappos, bbangert, exarkun, giampaolo.rodola, loewis, ned.deily, nicdumz, pitrou, ronaldoussoren, roysmith
Date 2010-11-22.01:22:12
SpamBayes Score 1.64684e-09
Marked as misclassified No
Message-id <>
>> The Python implementation sets timeout=None (which implies that the
>> underlying socket is blocking).
>No, it doesn't. A socket may be non-blocking without having a timeout;
> that's the socket API (on all systems, not just BSD).

Sure and this happens when the timeout is 0, but None has a different meaning than 0.

>> The problem is that it has.   It has created a new Python socket
>> object with a specific value for timeout (None), but the underlying
>> socket is nonblocking.
>> The docs state that timeout = None makes the socket blocking.
> What specific wording are you looking at that makes you believe so?

Here is the last part of the description of settimeout:

s.settimeout(None) is equivalent to s.setblocking(1)

if you look at setblocking:

Set blocking or non-blocking mode of the socket: if flag is 0, the socket is set to non-blocking, else to blocking mode. 

This seems to imply that timeout = None -> blocking.
Date User Action Args
2010-11-22 01:22:14Justin.Cappossetrecipients: + Justin.Cappos, loewis, ronaldoussoren, exarkun, roysmith, pitrou, giampaolo.rodola, ned.deily, nicdumz, bbangert
2010-11-22 01:22:14Justin.Cappossetmessageid: <>
2010-11-22 01:22:12Justin.Capposlinkissue7995 messages
2010-11-22 01:22:12Justin.Capposcreate