-
-
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
pip-compile --upgrade and --upgrade-package needn't be mutually exclusive #830
Comments
Fixes jazzband#829. Fixes jazzband#830. Allow the two options together, essentially making `--upgrade-package` a way of passing an extra constraint. Always parse `--upgrade-package`, regardless of whether the output file exists.
Hi @atugushev -- That commit was quite a while ago! My reasoning, in short:
I'm not an active user of this package any longer, but to me, this use case seems like a specific hack. Would it make more sense to be explicit and add a new flag, such as This approach would make the expected behavior clearer, instead of adding on to an existing feature. |
The way I see it I don't see my use case as hack. I do still want to upgrade Django, just with an extra constraint. Since I'm compiling multiple requirements files, this saves me writing N requirements.in files that different just by their Django constraint. The At this point, fixing #829 as per my PR #831 means we can remove the mutual incompatibility of |
Related to #829. I test some Django packages, with one requirements file for each. Sometimes I want to upgrade all the requirements in my files except Django, which I pin for each by passing e.g.
--upgrade-package 'Django>=2.1,<2.2
.Currently the options are mutually exclusive but I think it makes sense to allow
pip-compile --upgrade --upgrade-package 'Django>=2.1,<2.2
to mean "Upgrade all packages, except from add this constraint on Django.Environment Versions
Steps to replicate
See description
Expected result
The pins combine
Actual result
Error "Only one of --upgrade or --upgrade-package can be provided as an argument"
The text was updated successfully, but these errors were encountered: