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 jjlee
Recipients
Date 2004-06-13.23:16:17
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The method naming conventions of *_open and *_request
in urllib2 are accidentally met by the following methods:

AbstractHTTPHandler.do_open()
ProxyHandler.proxy_open()
AbstractHTTPHandler.redirect_request()

So URLs like do://example.com/ are regarded as having a
handler, and urllib2.urlopen("do://python.org/") causes
a TypeError.

I think *something* should be done about this, but I'm
willing to provide a different patch if this one is
frowned upon.  The alternative would be to rename
do_open and proxy_open, and leave the redirect_request
case unchanged (see below for why).

The first two methods are undocumented, so could in
theory be renamed.  However, people will likely be
overriding them anyway, so perhaps it's better to apply
this ugly patch than rename them.

redirect_request is documented, so can't be renamed,
but it will never be accidentally called unless
somebody actually adds a handler with a method named
"redirect_open".
History
Date User Action Args
2007-08-23 15:38:09adminlinkissue972322 messages
2007-08-23 15:38:09admincreate