-
Notifications
You must be signed in to change notification settings - Fork 55
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
Packages appear in export twice #251
Comments
I did search, but the connection to those issues was not clear to me. Appreciate the links, I'll read up. |
Actually, reading those other issues, I'm not so sure we're describing exactly the same thing, so I want to make sure. In this instance, the markers between the two deps are identical whereas the referenced issue seems to center around transitive dependencies which had different constraints being merged and constraints being lost. That's not the case here, these are completely safe to combine. So is the argument that since it isn't safe to combine sometimes that export will simply never combine because pip appears to handle this correctly regardless? I still don't quite track after reading those issues how two dependencies with different constraints in the lock file is resolved by pip, presumably it combines those constraints internally and does the right thing? @dimbleby would appreciate some insight if you know more about the internals there. |
Yes
Pip just evaluates exported requirements against the environment and either installs them or doesn't If the constraints are contradictory then poetry would not have locked them that way in the first place |
I've found that it's possible for packages can be listed in the export twice if they exist as a dependency with and without extras. Here's an example
pyproject.toml
:djangorestframework-simplejwt
also depends onpyjwt
, but without extras. If you export the resulting lockfile, you'll see:In the output. It's the same package, listed twice, once with and once without extras.
pip
is smart enough not to barf when this happens, but other tools (in my case Bazel) are not as smart about it and will throw errors.The text was updated successfully, but these errors were encountered: