-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Normalize paths starting with ~ in find-links #2455
Conversation
# blindly normalize anything starting with a ~... | ||
self.find_links = [] | ||
for link in find_links: | ||
if link.startswith('~'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should maybe also accept "file://~/som_path" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My instinct says no, ~/foo
is a path and should be subject to typical path expansions. But file://~/foo
is a URL, and ~-expansion isn't part of the URL spec.
self.find_links = [] | ||
for link in find_links: | ||
if link.startswith('~'): | ||
new_link = normalize_path(link) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You forgot to import normalize_path
. See pfmoore#1
pip/index.py: Add import of normalize_path
Normalize paths starting with ~ in find-links
No description provided.