New submission from R. David Murray <rdmur...@bitdance.com>: Currently the prototype uses timeout=socket._GLOBAL_DEFAULT_TIMEOUT, and the docs give the prototype as:
urlopen(url, data=None[, timeout], *, cafile=None, capath=None) which is unlike most other Python function prototypes in the docs, and makes no sense from a python syntax point of view. The current implementation makes it impossible to explicitly request the default timeout unless you look in the code and use the marked-private attribute of the socket module. I suggest the prototype be changed to either timeout=None with an explanation that that means "use the default socket timeout", or to some public sentinel that can be passed explicitly. I believe there are a number of other examples in the stdlib of None meaning "use the default", so I favor the former. ---------- components: Library (Lib) messages: 156932 nosy: orsenthil, r.david.murray priority: normal severity: normal stage: needs patch status: open title: Improve handling of 'timeout' parameter default in urllib.urlopen type: enhancement versions: Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14425> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com