]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-127090: Fix `urllib.response.addinfourl.url` value for opened `file:` URIs (#127091)
authorBarney Gale <barney.gale@gmail.com>
Sat, 7 Dec 2024 17:58:42 +0000 (17:58 +0000)
committerGitHub <noreply@github.com>
Sat, 7 Dec 2024 17:58:42 +0000 (17:58 +0000)
commit79b7cab50a3292a1c01466cf0e69fb7b4e56cfb1
tree19605ae130fee6d42c311f29ae51ea1c3887593f
parent27d0d2141319d82709eb09ba20065df3e1714fab
GH-127090: Fix `urllib.response.addinfourl.url` value for opened `file:` URIs (#127091)

The canonical `file:` URL (as generated by `pathname2url()`) is now used as the `url` attribute of the returned `addinfourl` object. The `addinfourl.url` attribute reflects the resolved URL for both `file:` or `http[s]:` URLs now.
Lib/test/test_urllib.py
Lib/test/test_urllib2.py
Lib/test/test_urllib2net.py
Lib/urllib/request.py
Misc/NEWS.d/next/Library/2024-11-21-06-03-46.gh-issue-127090.yUYwdh.rst [new file with mode: 0644]