-
Notifications
You must be signed in to change notification settings - Fork 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
Poetry multiple-constraint dependencies broken by unrelated dependency update #5862
Comments
Thanks for the detailed issue. We have a few python improvements that we're currently working on, although looking at them I don't think any will fix this particular issues. So it might be a bit til one of us can get to it, in the meantime if you have any interest in opening a PR I'm more than happy to guide you. |
Happy to give it a try 🙂
If these include PEP621 support, it might also be worth keeping an eye on python-poetry/roadmap#3 -- at least for my use case, I wouldn't mind migrating the I think there are two goals for this issue, with potentially quite different difficulty:
For 2., it would be helpful to know how (if?) dependabot handles environment markers in the other supported Python formats ( |
Hei @greschd! We're adding PEP621 support soon indeed and I'm already subscribed to that ticket in the poetry roadmap, thanks! Regarding your question, no, I don't think we support updating dependencies with environment markers in any Python format as of now, so I think for now fixing 1 is the easiest, just make sure they are properly ignored. |
Dependabot now gracefully ignores dependency constraints that depend on the Python version, see dependabot/dependabot-core#5862
Is there an existing issue for this?
Package ecosystem
pip
Package manager version
Poetry (version 1.2.1)
Language version
python = ">=3.7,<3.10"
Manifest location and content before the Dependabot update
pyproject.toml
: https://github.com/greschd/dependabot-poetry-multiple-constraints/blob/4c051f7216cbb70decb1b206fe8de7ff060c188a/pyproject.tomlpoetry.lock
: https://github.com/greschd/dependabot-poetry-multiple-constraints/blob/4c051f7216cbb70decb1b206fe8de7ff060c188a/poetry.lockdependabot.yml content
https://github.com/greschd/dependabot-poetry-multiple-constraints/blob/4c051f7216cbb70decb1b206fe8de7ff060c188a/.github/dependabot.yml
Updated dependency
wheel
updated from0.37.0
to0.37.1
What you expected to see, versus what you actually saw
Only the
wheel
related entries inpoetry.lock
should be updated. Instead, the multiple-constraintnumpy
dependency is partially removed.It seems that dependabot doesn't understand the multiple-constraint dependency (different
numpy
version for differentpython
versions)This is mentioned in #2715 (comment), but I couldn't find an issue specific to this incompatibility.
In the
poetry.lock
, the multiple-constraint dependency is added as multiplenumpy
entries (AFAICT, the last matching one is selected for a given Python version). Dependabot updates keep only the first entry, and discard the rest.Native package manager behavior
PR created manually, using
poetry lock
: greschd/dependabot-poetry-multiple-constraints#2Images of the diff or a link to the PR, issue, or logs
greschd/dependabot-poetry-multiple-constraints#1
Smallest manifest that reproduces the issue
Almost minimal repository: https://github.com/greschd/dependabot-poetry-multiple-constraints
The text was updated successfully, but these errors were encountered: