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
Unexpected inability to resolve dependencies depending on state of requirements.txt file #1997
Comments
Try the upgrade mode? |
I will give this a try on Tuesday, I suspect it will work, but it will probably upgrade a bunch of dependencies that we'd rather not upgrade if possible. Will let you know! |
You can pass a specific package to that arg. |
I'll do some more playing around given these suggestions, thanks. I suspect that for our usecase, working with --upgrade will be unnatural. When generating a new requirements.txt, we generate an ephemeral requirements.in and compile alongside the the previous version of the requirements.txt. We'd like to make a "minimal" set of version changes across packages (although minimal is a nebulous quality), even if it involves downgrading packages. We could work around this by doing a diff of the packages being added/removed/modified in the requirements.in file, but I suspect it'll be errorprone/not-correct, as there could be intermediate dependencies that hit this issue as well I guess I left out a detail that makes the existing behavior interesting:
pip-compile also happily generates
It's happy to downgrade httpx from 0.25.0 to 0.24.1 in this case |
I would agree that specifying I also wanted to point out some potential similarities with #1818. I believe both cases involve the resolver not discarding the existing lockfile version even when it should have enough information to know that it is now invalid. The Should we expect If the exception is preferrable, then I would expect the exception to indicate that the impossible constraints were |
Given the following file setup:
pip-compile generates
But if there is an existing, possibly-stale requirements.txt file, like:
pip-compile will throw an error:
Removing the pytest-httpx line in the requirements.txt file allows pip-compile to complete successfully. Ideally manual patching of the existing requirements.txt is not needed.
The text was updated successfully, but these errors were encountered: