-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
-r in constraint files yields constraints #8821
base: main
Are you sure you want to change the base?
Conversation
I’m still not convinced this is the right thing to do, but the implementation should work if we decide to do this. |
Agreed. I think people should be using As part of cleaning up the model of what constraints are with the new resolver, I think disallowing |
I don't know. To me the use case in #8416 sounds reasonable. And documenting |
I see no reason why #8416 can't be fixed by simply using I'm very keen on keeping a clear distinction between constraints files and requirements files, which is why I'm against this change. |
Maybe. I don't have the use case myself, so that needs clarification for sure.
So that means rejecting |
Yep, I'd assume so. |
Since requirements files already allow a lot of pip command line options, I'd find it strange to disallow However I'd be totally on board to disallow |
Thinking it through, some more, I agree. Requirements files are "a bunch of stuff you can supply on the command line collected together", so allowing |
Sorry for the delayed response, the reason why we end up with -r and -c nested is because we are using the same files as requirements for some build configurations and constraints for others. One example would be having a "dev" and "prod" environment, where the things that are required in dev (including transitively from other files) act as version constraints for prod, because we never want to deploy a different version of a package than we developed with, but we are ok with not deploying some package that was available in dev. Our actual usecase involves more complexity, with a large number of different "dev" and "prod"-like configurations, and we would ideally like to describe the relationship between them in the .txt files themselves. As you point out, if we're willing to write a script that understands this tree structure outside of pip, we could put no -r or -c flags into any of the files, and have an external wrapper script that generates the appropriate -r/-c flags for each configuration we wish to invoke pip with, but that is less preferred because it obfuscates what exactly gets included with a given deploy configuration. |
Fixes #8416