[issue14425] Improve handling of 'timeout' parameter default in urllib.urlopen

2012-04-07 Thread Senthil Kumaran
Senthil Kumaran added the comment: Hi David, I am sorry, I did not notice your second comment in this bug and later when you closed this, noticed the bug report. Yes, the default=None but actually pointing to a sentinel value is an odd duck and I believe the explanation in docs were update

[issue14425] Improve handling of 'timeout' parameter default in urllib.urlopen

2012-04-03 Thread R. David Murray
R. David Murray added the comment: Well, it turns out that this design is intentional, because actually using the global socket timeout is deprecated (see issue 2451). (That is, the non-None default value of the timeout parameter is a backward compatibility hack.) So I'm closing this as inva

[issue14425] Improve handling of 'timeout' parameter default in urllib.urlopen

2012-03-27 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue14425] Improve handling of 'timeout' parameter default in urllib.urlopen

2012-03-27 Thread Federico Reghenzani
Federico Reghenzani added the comment: I think the same change is needed in function open(url, data=None[, timeout]) of OpenerDirector. I added this other patch. -- nosy: +federico.reghenzani Added file: http://bugs.python.org/file25045/OpenDirector.patch _

[issue14425] Improve handling of 'timeout' parameter default in urllib.urlopen

2012-03-27 Thread R. David Murray
R. David Murray added the comment: Thanks. Looks good to me. I'll give Senthil a little time to comment, in case he disagrees with my proposal, before committing it. We could conceivably apply this as a bug fix to 3.2, since I don't think there is any backward compatibility issue.

[issue14425] Improve handling of 'timeout' parameter default in urllib.urlopen

2012-03-27 Thread Jeff McNeil
Jeff McNeil added the comment: Quick little patch to change the default to None and update the corresponding documentation. -- keywords: +patch nosy: +mcjeff Added file: http://bugs.python.org/file25044/urllib_urlopen_default.patch ___ Python tracke

[issue14425] Improve handling of 'timeout' parameter default in urllib.urlopen

2012-03-27 Thread R. David Murray
New submission from R. David Murray : 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 sens