[New-bugs-announce] [issue39799] Never return base's fragment from urljoin (urllib.parse)

Open Close report at bugs.python.org
Sat Feb 29 10:04:08 EST 2020

New submission from Open Close <openandclose23 at gmail.com>:

According to RFC3986 5.2.2.,
target fragment is always reference fragment
(T.fragment = R.fragment;).

This is different from RFC1808 (4. and 5.2.).
And it is not mentioned
in Modifications section in RFC2396 and RFC3986.

>>> import urllib.parse
>>> urllib.parse.urljoin('http://a/b#f', '')

Should return:



components: Library (Lib)
messages: 362983
nosy: op368
priority: normal
severity: normal
status: open
title: Never return base's fragment from urljoin (urllib.parse)
type: behavior
versions: Python 3.9

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list