]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] GH-126212: Fix removal of slashes in file URIs on Windows (GH-126214) (#126591)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 8 Nov 2024 17:21:42 +0000 (18:21 +0100)
committerGitHub <noreply@github.com>
Fri, 8 Nov 2024 17:21:42 +0000 (17:21 +0000)
commit5fb443d6254d53f43acb0b39a7615d56f4fc7355
tree5ca9777d27dec13d8833e56e55d568dfab849688
parent69849ad28825c0ccc1ebd97f3eeddebd64a0e6ee
[3.12] GH-126212: Fix removal of slashes in file URIs on Windows (GH-126214) (#126591)

GH-126212: Fix removal of slashes in file URIs on Windows (GH-126214)

Adjust `urllib.request.pathname2url()` and `url2pathname()` so that they
don't remove slashes from Windows DOS drive paths and URLs. There was no
basis for this behaviour, and it conflicts with how UNC and POSIX paths are
handled.
(cherry picked from commit 54c63a32d06cb5f07a66245c375eac7d7efb964a)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
Lib/nturl2path.py
Lib/test/test_urllib.py
Misc/NEWS.d/next/Library/2024-10-30-23-59-36.gh-issue-126212._9uYjT.rst [new file with mode: 0644]