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

Enhance the option lines in output #448

Merged
merged 4 commits into from
Mar 31, 2017

Conversation

tonyseek
Copy link
Contributor

@tonyseek tonyseek commented Feb 7, 2017

Description

There is a proposal to fix following output:

--index-url http://pypi.example.com/root/pypi
--extra-index-url http://pypi.example.com/root/pypi
--extra-index-url http://pypi.example.com/root/pypi
--trusted-host pypi.example.com
--trusted-host pypi.example.com

Those output may be caused by multiple option sources (e.g. env PIP_INDEX_URL=$U PIP_EXTRA_INDEX_URL=$U pip-compile --extra-index-url=$U x.in).

Changes

@tonyseek tonyseek force-pushed the feature/enhance-option-lines branch from 81e67bc to 896264d Compare February 8, 2017 07:19
suutari-ai added a commit to suutari/prequ that referenced this pull request Feb 9, 2017
Mark the merged PRs of pip-tools in Change Log more clearly so that it
is easier to keep track which fixes/features are already in.

This includes following 7 PRs:

  * jazzband#355
  * jazzband#378
  * jazzband#389
  * jazzband#417
  * jazzband#441
  * jazzband#448
  * jazzband#450
@@ -46,6 +46,8 @@ class PipCommand(pip.basecommand.Command):
help="Add header to generated file")
@click.option('--index/--no-index', is_flag=True, default=True,
help="Add index URL to generated file")
@click.option('--emit-trusted-host/--no-trusted-host', is_flag=True, default=True,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid confusion, the --no flag should provide symmetry to the positive version: --no-emit-trusted-host.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree and done

suutari-ai added a commit to suutari/prequ that referenced this pull request Mar 11, 2017
…p-tools

Merge latest changes from jazzband#448 PR.

Also updated the Change Log entry.

* 'feature/enhance-option-lines' of github.com:tonyseek/pip-tools:
  Rename "no-trusted-host" to "no-emit-trusted-host"
@Groxx
Copy link

Groxx commented Mar 30, 2017

Since things have changed a bit, think you could rebase?

I'd love to get this in, inconsistent --trusted-host lines are the one thing at the moment that prevents dev and CI environments from generating identical *.txt files, and I love having an automated sanity check to catch people who edit requirements.txt. Not sure how to bump it for attention though (beyond updating the code / leaving a comment).

for x in iterable:
if x not in emitted:
yield x
emitted.add(x)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The merged PR #468, which does a similar fix for index-urls unicity, uses the OrderedDict idiom to get unique entries, could you reuse that?

@tonyseek tonyseek force-pushed the feature/enhance-option-lines branch from d7ed6d5 to c12d005 Compare March 31, 2017 08:52
@tonyseek
Copy link
Contributor Author

@Groxx @davidovich Thanks for your review. The branch is up-to-date now and the revision is pushed.

Copy link
Contributor

@davidovich davidovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tonyseek!

@bepetersn
Copy link

Wondering if removing --extra-index-url from requirements.txt output is possible as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add parameter --no-trusted-host: Don't add trusted host to generated file
4 participants