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 demian.brecht
Recipients berker.peksag, demian.brecht, madison.may, martin.panter, mher, orsenthil
Date 2015-03-17.23:47:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1426636066.67.0.067024573674.issue18828@psf.upfronthosting.co.za>
In-reply-to
Content
> I haven’t heard any arguments against this option yet, and it didn’t break any tests.

Pre patch:

>>> urljoin('mailto:foo@', 'bar.com')
'bar.com'

Post patch:

>>> urljoin('mailto:foo@', 'bar.com')
'mailto:bar.com/bar.com'

I'm taking an educated guess here based on a marginal amount of research (there are just a few registered schemes at http://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml that should be understood), but it /seems/ like perhaps the current behaviour is intended to safeguard against joining non-hierarchical schemes in which case you'd get nonsensical values. It does seem a little odd to me, but I definitely prefer the former behaviour to the latter.

I think that short term, Madison's suggestion about documenting uses_relative would be an easy win and can be applied to all branches. Long term though, I think it would be nice to have a generalized urljoin() method that accounts for most (if not all) classifications of url schemes.

Thoughts?
History
Date User Action Args
2015-03-17 23:47:46demian.brechtsetrecipients: + demian.brecht, orsenthil, mher, berker.peksag, martin.panter, madison.may
2015-03-17 23:47:46demian.brechtsetmessageid: <1426636066.67.0.067024573674.issue18828@psf.upfronthosting.co.za>
2015-03-17 23:47:46demian.brechtlinkissue18828 messages
2015-03-17 23:47:46demian.brechtcreate