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

Normalize paths starting with ~ in find-links #2455

Merged
merged 3 commits into from
Mar 7, 2015

Conversation

pfmoore
Copy link
Member

@pfmoore pfmoore commented Feb 24, 2015

No description provided.

# blindly normalize anything starting with a ~...
self.find_links = []
for link in find_links:
if link.startswith('~'):
Copy link
Member

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" ?

Copy link
Member Author

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)
Copy link
Contributor

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
pfmoore added a commit that referenced this pull request Mar 7, 2015
Normalize paths starting with ~ in find-links
@pfmoore pfmoore merged commit 98df838 into pypa:develop Mar 7, 2015
msabramo added a commit to msabramo/pip that referenced this pull request Mar 11, 2015
Adds a `test_tilde` test to augment @pfmoore's work in
pypa#2455 ("Normalize paths starting with ~
in find-links")

This would've caught the missing import problem we had
(pfmoore#1).
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2019
@pfmoore pfmoore deleted the normalize_findlinks branch January 24, 2021 11:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants