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

Investigate python3.12 http fs path parsing errors #233

Closed
ap-- opened this issue Jul 9, 2024 · 3 comments · Fixed by #236
Closed

Investigate python3.12 http fs path parsing errors #233

ap-- opened this issue Jul 9, 2024 · 3 comments · Fixed by #236
Assignees
Labels
bug 🐛 Something isn't working

Comments

@ap--
Copy link
Collaborator

ap-- commented Jul 9, 2024

Two test cases in upath/tests/implementations/test_http.py::test_empty_parts fail across OSes only for python3.12.

See: https://github.com/fsspec/universal_pathlib/pull/232/checks
(and all the other PRs)

Need to investigate...

@ap-- ap-- added the bug 🐛 Something isn't working label Jul 9, 2024
@ap-- ap-- self-assigned this Jul 9, 2024
@ap--
Copy link
Collaborator Author

ap-- commented Jul 21, 2024

🕵️ investigating further:

Occurs with 3.12.4
Does not occur with 3.12.2

Can now reproduce locally.

@ap--
Copy link
Collaborator Author

ap-- commented Jul 21, 2024

... root cause seems to be a change in behavior of urllib.parse.SplitResult

# for example python3.9
>>> SplitResult(scheme="", netloc="", path="//", fragment="", query="").geturl()
'//'

# python 3.12.4
>>> SplitResult(scheme="", netloc="", path="//", fragment="", query="").geturl()
'////'

@ap--
Copy link
Collaborator Author

ap-- commented Jul 21, 2024

It's related to this PR: python/cpython#113563

It seems that new behavior is intended, and it's being backported to 3.8, 3.9, 3.10, and 3.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant