[docs] [issue8595] Explain the default timeout in http-client-related libraries

Julian report at bugs.python.org
Sun May 2 05:45:08 CEST 2010

Julian <python_org at somethinkodd.com> added the comment:


Consider the definition of httplib.HTTPConnection.__init__(), in Python 2.6.

   def __init__(self, host, port=None, strict=None,

This could be replaced with:

   def __init__(self, host, port=None, strict=None,

or, perhaps better, 

   def __init__(self, host, port=None, strict=None,

This timeout value is passed to the call in socket.create_connection, so I believe if it is overriden, it only applies to the relevant sockets and not to all sockets globally.

Note: I am not arguing here that this SHOULD be done - it would break existing applications, especially those that were written before Python 2.6 - merely that it COULD be done.


Python tracker <report at bugs.python.org>

More information about the docs mailing list