This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Never return base's fragment from urljoin (urllib.parse)
Type: behavior Stage: patch review
Components: Library (Lib) Versions: Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: op368
Priority: normal Keywords: patch

Created on 2020-02-29 15:04 by op368, last changed 2022-04-11 14:59 by admin.

Files
File name Uploaded Description Edit
1.patch op368, 2020-02-29 15:06
Pull Requests
URL Status Linked Edit
PR 18710 open op368, 2020-02-29 20:02
Messages (2)
msg362983 - (view) Author: Open Close (op368) * Date: 2020-02-29 15:04
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.

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

Should return:
'http://a/b'

---

https://tools.ietf.org/html/rfc3986#section-5.2.2
https://tools.ietf.org/html/rfc1808.html#section-4
https://tools.ietf.org/html/rfc1808.html#section-5.2
msg362984 - (view) Author: Open Close (op368) * Date: 2020-02-29 15:06
Uploaded the patch (1.patch).
History
Date User Action Args
2022-04-11 14:59:27adminsetgithub: 83980
2020-02-29 20:02:49op368setstage: patch review
pull_requests: + pull_request18069
2020-02-29 15:06:53op368setfiles: + 1.patch
keywords: + patch
messages: + msg362984
2020-02-29 15:04:08op368create