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 martin.panter
Recipients berker.peksag, demian.brecht, madison.may, martin.panter, mher, orsenthil
Date 2015-03-26.11:26:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1427369197.67.0.173397597731.issue18828@psf.upfronthosting.co.za>
In-reply-to
Content
The current behaviour when no scheme is present is fairly sensible to me and should not be changed to do string concatenation nor raise an exception:

>>> urljoin("//netloc/old/path", "new/path")
'//netloc/old/new/path'

I am posting urljoin-non-hier.patch as an alternative to my first patch. This one changes urljoin() to work on any URL scheme not in the existing “non_hierarchical” blacklist. I removed the gopher, wais, and imap schemes from the list, and added tel, so that urljoin() continues to treat these special cases as before. Out of the schemes mentioned in the module but missing from uses_relative, I think non_hierarchical now has all those without directory components: hdl, mailto, news, sip, sips, snews, tel, telnet.

However I am still not really convinced that my first urljoin-scheme.patch is a bad idea. Do people actually use urljoin() with these schemes like mailto in the first place?
History
Date User Action Args
2015-03-26 11:26:38martin.pantersetrecipients: + martin.panter, orsenthil, mher, berker.peksag, demian.brecht, madison.may
2015-03-26 11:26:37martin.pantersetmessageid: <1427369197.67.0.173397597731.issue18828@psf.upfronthosting.co.za>
2015-03-26 11:26:37martin.panterlinkissue18828 messages
2015-03-26 11:26:37martin.pantercreate