Skip to content

[3.12] GH-85168: Use filesystem encoding when converting to/from file URIs (GH-126852) #127040

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Nov 19, 2024

Adjust urllib.request.url2pathname() and pathname2url() to use the
filesystem encoding when quoting and unquoting file URIs, rather than
forcing use of UTF-8.

No changes are needed in the nturl2path module because Windows always
uses UTF-8, per PEP 529.
(cherry picked from commit c9b399f)

Co-authored-by: Barney Gale barney.gale@gmail.com

…` URIs (pythonGH-126852)

Adjust `urllib.request.url2pathname()` and `pathname2url()` to use the
filesystem encoding when quoting and unquoting file URIs, rather than
forcing use of UTF-8.

No changes are needed in the `nturl2path` module because Windows always
uses UTF-8, per PEP 529.
(cherry picked from commit c9b399f)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
@barneygale barneygale merged commit 7735f58 into python:3.12 Nov 19, 2024
29 of 30 checks passed
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.

2 participants