]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] GH-126212: Fix removal of slashes in file URIs on Windows (GH-126214) (#126590)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 8 Nov 2024 17:31:44 +0000 (18:31 +0100)
committerGitHub <noreply@github.com>
Fri, 8 Nov 2024 17:31:44 +0000 (17:31 +0000)
commit20043d5cf4815028c4a1a75a109bf97e2feeb207
tree15f263a94b08e46ac2b45a529bf844acd909649f
parentb1a406d923245f18296a22cc04d2d139f78127fd
[3.13] GH-126212: Fix removal of slashes in file URIs on Windows (GH-126214) (#126590)

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]