-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
Add -c/--constraint
option to pip-compile
#1936
Conversation
piptools/scripts/compile.py
Outdated
multiple=True, | ||
help=( | ||
"Constrain versions using the given constraints file. " | ||
"This option can be used multiple times." |
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.
All the other multiple=True
options are using the exact phrase "may be used more than once" 🤷🏼
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! Addressed in d5e13f7.
tests/test_utils.py
Outdated
@@ -634,6 +634,7 @@ def test_callback_config_file_defaults(pyproject_param, new_default, make_config | |||
("trusted_host", "not-a-list"), | |||
("annotate", "not-a-bool"), | |||
("max_rounds", "not-an-int"), | |||
("constraint", "not-an-int"), |
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.
int?
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! Fixed in d5e13f7.
Thanks for the review @AndydeCleyre 🙏🏻 |
Not that it matters, but "not-an-list" |
Thank you so much for adding this command line option! It seems only local file is supported. Is that correct? pip, however can use constraints file from any URL: https://pip.pypa.io/en/stable/user_guide/#constraints-files. Maybe that could be supported as well by pip-compile? |
Maybe it could be as simple as removing Updated: I tried that locally and it seems working. |
I proposed a change in #2038. We could go extra steps to validate local file and remote file, but it doesn't seem to be absolutely necessary. |
Contributor checklist
Maintainer checklist
backwards incompatible
,feature
,enhancement
,deprecation
,bug
,dependency
,docs
orskip-changelog
as they determine changelog listing.