Message156932
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. |
|
Date |
User |
Action |
Args |
2012-03-27 15:02:38 | r.david.murray | set | recipients:
+ r.david.murray, orsenthil |
2012-03-27 15:02:38 | r.david.murray | set | messageid: <1332860558.06.0.334522792296.issue14425@psf.upfronthosting.co.za> |
2012-03-27 15:02:37 | r.david.murray | link | issue14425 messages |
2012-03-27 15:02:37 | r.david.murray | create | |
|