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

uri2fsn: fix handling of relative paths with newer Python #17

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

lazka
Copy link
Member

@lazka lazka commented Nov 26, 2024

Python 3.12 changed urlunparse() results for relative file uris as a side
effect of some other changes. It's not clear what and why from the
git history, so try to reproduce the new behaviour for all Python
versions (if path doesn't start with / then strip them from the result).

And since urlunparse() is no longer guaranteed to return uris starting
// move the netloc hack up to simplify things.

tbh I'm a bit out of the loop re URIs, so I hope on the test coverage
to prevent any oversights.

Fixes #16

Python 3.12 changed urlunparse() results for relative file uris as a side
effect of some other changes. It's not clear what and why from the
git history, so try to reproduce the new behaviour for all Python
versions (if path doesn't start with / then strip them from the result).

And since urlunparse() is no longer guaranteed to return uris starting
// move the netloc hack up to simplify things.

tbh I'm a bit out of the loop re URIs, so I hope on the test coverage
to prevent any oversights.

Fixes quodlibet#16
@lazka lazka merged commit b32bb80 into quodlibet:main Nov 26, 2024
27 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.

Tests fail with python 3.12 and higher
1 participant