Demian Brecht added the comment:

> 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?

----------
nosy: +demian.brecht

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18828>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to