[New-bugs-announce] [issue2451] No way to disable socket timeouts in httplib, etc.

John J Lee report at bugs.python.org
Sat Mar 22 00:16:18 CET 2008


New submission from John J Lee <jjlee at users.sourceforge.net>:

The new timeout support in 2.6 makes use of new function
socket.create_connection().  socket.create_connection() provides no way
to disable timeouts, other than by relying on socket.getdefaulttimeout()
returning None.  This is unfortunate, because it was the purpose of the
new timeout support to allow control of timeouts without reliance on
global state.

setdefaultsocket.create_connection() should always call
sock.settimeout() with the timeout passed to create_connection(), unless
a special non-None value is passed indicating that the global default is
to be used.  Specific modules may then use that special non-None value
where required, to preserve backwards-compatibility.

----------
components: Library (Lib)
messages: 64293
nosy: jjlee
severity: normal
status: open
title: No way to disable socket timeouts in httplib, etc.
versions: Python 2.6

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2451>
__________________________________


More information about the New-bugs-announce mailing list