Current pip-compile usage does not have --no-emit-index-url
#1390
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Unfortunately, default usage of
pip-compileemits user's configuredindex-urlby default, when the user has one configured in itspips config file.To avoid this behavior a flag
--no-emit-index-urlmust be set.Solution
While this issue is not fixed in their repo (there is an open issue about this insecure behavior), I'm adding the flag
--no-emit-index-urlto existingpip-compileexecutions to protect contributors from having their credentials leaked.Additional improvement
Maybe it's a matter of preference, but I added a flag
--annotation-style=linethat makes the generatedrequirements.txtlook much cleaner, shorter and more readable. This change can be removed, if not accepted.From:
To: