-
-
Notifications
You must be signed in to change notification settings - Fork 612
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
remove duplicate index urls #468
remove duplicate index urls #468
Conversation
piptools/scripts/compile.py
Outdated
@@ -143,6 +143,8 @@ def cli(verbose, dry_run, pre, rebuild, find_links, index_url, extra_index_url, | |||
repository = LocalRequirementsRepository(existing_pins, repository) | |||
|
|||
log.debug('Using indexes:') | |||
# remove duplicate index urls before processing | |||
repository.finder.index_urls = sorted(set(repository.finder.index_urls)) |
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.
Thanks for your contribution!
As it is, this has the possibility of changing the index-url order, which is a property that needs to be maintained.
As a user, I might use index urls to explicitly set desired index usage ( A -> B -> C ).
See http://stackoverflow.com/a/39835527/28275 for a clean reference implementation that keeps order.
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.
That's fine by me. I have pushed an update with the collections implementation as per your link.
Thanks for this @majuscule |
Happy to help! If you have time, I would appreciate your thoughts on my comment to you here: #418 (comment). |
…e-indexes remove duplicate index urls
closes issue #316