Skip to content

Promote _ensure_quoted_url() to a shared utility function #13498

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

Closed
wants to merge 6 commits into from

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented Jul 21, 2025

Prep work for fixing url2pathname()/pathname2url() test failures in 3.14

Move pip._internal.models.link._ensure_quoted_url() to pip._internal.utils.urls.clean_url().

Call clean_url() from pip._internal.vcs.git to clean up git+file: URLs.

Taken with #13497, this ensures that urllib.request.url2pathname() is called only from the urls module.

Remove code from 2011 that claims to work around a Git bug. Unfortunately
the cited link is dead, and the tests all pass with the code removed.
Whatever the bug was, it's likely to have been fixed in the last 14 years.
@barneygale barneygale marked this pull request as draft July 21, 2025 19:58
@barneygale barneygale changed the title Stop working around old Git bug Promote _ensure_quoted_url() to a shared utility function Jul 23, 2025
@barneygale barneygale closed this Jul 23, 2025
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant