FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.13] gh-156713: Use the filesystem encoding in nturl2path (GH-156717) by serhiy-storchaka · Pull Request #157425 · python/cpython · GitHub

Repository navigation

[3.13] gh-156713: Use the filesystem encoding in nturl2path (GH-156717) - #157425

Merged
serhiy-storchaka merged 1 commit into
python:3.13from
serhiy-storchaka:backport-01599e2-3.13
Sep 13, 2026
Merged

serhiy-storchaka merged 1 commit into
python:3.13from
serhiy-storchaka:backport-01599e2-3.13

Conversation

Copy link
Copy Markdown
Member

urllib.request.pathname2url() and url2pathname() use the filesystem encoding and error handler since gh-85168, but the nturl2path module, which implemented them on Windows before 3.14, was left unchanged. Paths containing surrogate characters raised UnicodeEncodeError.

Manual backport: 3.13 still has the old nturl2path implementation and no test_nturl2path, so the tests were added to test_urllib.Pathname_Tests.

(cherry picked from commit 01599e2)

…thonGH-156717)

urllib.request.pathname2url() and url2pathname() use the filesystem encoding
and error handler since pythongh-85168, but nturl2path, which implements them on
Windows before 3.14, was left unchanged.  Paths containing surrogate
characters raised UnicodeEncodeError.
(cherry picked from commit 01599e2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL