Skip to content
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

Accommodate for recent pathname2url() changes upstream #13105

Merged
merged 1 commit into from
Dec 7, 2024

Conversation

ichard26
Copy link
Member

@ichard26 ichard26 commented Dec 7, 2024

  • UNC paths converted to URLs now start with two slashes, like earlier (yes, really!)
  • Trailing slashes are now preserved on Windows, matching POSIX behaviour

Fixes #13104.

- UNC paths converted to URLs now start with two slashes, like earlier (yes, really)
- Trailing slashes are now preserved on Windows, matching POSIX behaviour
@ichard26 ichard26 requested a review from uranusjr December 7, 2024 01:33
@ichard26 ichard26 removed the request for review from uranusjr December 7, 2024 01:33
@ichard26
Copy link
Member Author

ichard26 commented Dec 7, 2024

/cc @pfmoore @uranusjr for your Windows expertise.

Copy link
Member

@pfmoore pfmoore left a comment

Choose a reason for hiding this comment

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

Frankly, I think the way Windows pathnames are translated to URLs is a dumpster fire, and I wish we could avoid using it at all. But given that we have to, this is as good a way as any of testing it works for what we need.

@sbidoul sbidoul added this to the 25.0 milestone Dec 7, 2024
@sbidoul sbidoul merged commit a75dad5 into pypa:main Dec 7, 2024
33 checks passed
@notatallshaw
Copy link
Member

I think the way Windows pathnames are translated to URLs is a dumpster fire

I just recently saw this comment and certainly never realized before it was so confusing: #13062 (comment)

@pfmoore
Copy link
Member

pfmoore commented Dec 7, 2024

That's not even all of it. There's variants like file://C:|Windows/System32 which I believe are obsolete, but still found in the wild 🙁

@ichard26 ichard26 deleted the windows-paths branch December 7, 2024 19:17
@barneygale
Copy link
Contributor

I am trying to extinguish the url2pathname() and pathname2url() dumpster fires, but there are a lot of wrongs to right! I believe there will be no more backports, with the remaining work being 3.14+ only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CPython 3.13.1 is breaking Windows CI
5 participants