This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients orsenthil, r.david.murray
Date 2012-03-27.15:02:37
SpamBayes Score 1.3270057e-10
Marked as misclassified No
Message-id <1332860558.06.0.334522792296.issue14425@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-03-27 15:02:38r.david.murraysetrecipients: + r.david.murray, orsenthil
2012-03-27 15:02:38r.david.murraysetmessageid: <1332860558.06.0.334522792296.issue14425@psf.upfronthosting.co.za>
2012-03-27 15:02:37r.david.murraylinkissue14425 messages
2012-03-27 15:02:37r.david.murraycreate