Message238363
> 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? |
|
Date |
User |
Action |
Args |
2015-03-17 23:47:46 | demian.brecht | set | recipients:
+ demian.brecht, orsenthil, mher, berker.peksag, martin.panter, madison.may |
2015-03-17 23:47:46 | demian.brecht | set | messageid: <1426636066.67.0.067024573674.issue18828@psf.upfronthosting.co.za> |
2015-03-17 23:47:46 | demian.brecht | link | issue18828 messages |
2015-03-17 23:47:46 | demian.brecht | create | |
|