Thanks to visit codestin.com
Credit goes to github.com

Skip to content

GH-125866: Preserve Windows drive letter case in file URIs #127138

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 23, 2024

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented Nov 22, 2024

Stop converting Windows drive letters to uppercase in urllib.request.pathname2url() and url2pathname(). This behaviour is unexpected and inconsistent with pathlib's file URI implementation.


📚 Documentation preview 📚: https://cpython-previews--127138.org.readthedocs.build/

Stop converting Windows drive letters to uppercase in
`urllib.request.pathname2url()` and `url2pathname()`. This behaviour is
unnecessary and inconsistent with pathlib's file URI implementation.
@barneygale barneygale marked this pull request as ready for review November 22, 2024 05:18
@barneygale barneygale requested a review from a team November 22, 2024 05:18
Copy link
Member

@zooba zooba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The RFC also says that case should be preserved up until it's being processed by the file system, so we shouldn't be changing it here. (I still wouldn't backport this change, due to the trivial impact apart from breaking anyone who wrote a case-sensitive test that currently passes!)

@barneygale
Copy link
Contributor Author

Agreed! And thanks for the review.

@barneygale barneygale merged commit cc813e1 into python:main Nov 23, 2024
43 checks passed
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
…hon#127138)

Stop converting Windows drive letters to uppercase in
`urllib.request.pathname2url()` and `url2pathname()`. This behaviour is
unnecessary and inconsistent with pathlib's file URI implementation.
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