Martin Panter added the comment: I opened Issue 23703 about the funny doubled bar.com result. After backing out revision 901e4e52b20a, but with my patch here applied:
>>> urljoin('mailto:foo@', 'bar.com') 'mailto:bar.com' which seems fairly sensible to me. A more awkward question is if this behaviour of my patch is reasonable: >>> urljoin('mailto:person-foo/b...@example.net', 'bar.com') 'mailto:person-foo/bar.com' Yet another option, similar to my “any_scheme=True” flag, might be to change from the “uses_relative” white-list to a “not_relative” black-list of URL schemes, so that urljoin() works for arbitrary schemes except for ones like “mailto:” that are in the hard-coded list. ---------- _______________________________________ 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