Message239324
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? |
|
Date |
User |
Action |
Args |
2015-03-26 11:26:38 | martin.panter | set | recipients:
+ martin.panter, orsenthil, mher, berker.peksag, demian.brecht, madison.may |
2015-03-26 11:26:37 | martin.panter | set | messageid: <1427369197.67.0.173397597731.issue18828@psf.upfronthosting.co.za> |
2015-03-26 11:26:37 | martin.panter | link | issue18828 messages |
2015-03-26 11:26:37 | martin.panter | create | |
|