[Python-Dev] I vote to reject: Adding timeout to socket.py and httplib.py.

Nick Coghlan ncoghlan at gmail.com
Wed Mar 21 14:44:22 CET 2007


Alan Kennedy wrote:
> I think this patch is poorly designed and poorly implemented. There
> are multiple problems in its 17 lines of socket module code; every
> time I look I find a new problem.

Code which is copied verbatim from httplib, and also occurs with slight 
variations in several other standard library modules.

So all these objections indicate to me is that the operation *needs* to 
be centralised, any issues corrected, and then the corrected version 
invoked from all of the places in the standard library that need it. 
httplib just happens to be the first cab off the rank (as was discussed 
on this list a short time ago).

The objection about "but it doesn't support non-blocking sockets" 
doesn't make sense to me. This is a function to make creation of a 
blocking socket more convenient - if you're doing non-blocking IO, why 
would you even try to use it?

Cheers,
Nick.


-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org


More information about the Python-Dev mailing list