Closed greschd closed 2 years ago
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.
if you have any interest in opening a PR I'm more than happy to guide you
Happy to give it a try 🙂
We have a few python improvements that we're currently working on
If these include PEP621 support, it might also be worth keeping an eye on https://github.com/python-poetry/roadmap/issues/3 -- at least for my use case, I wouldn't mind migrating the pyproject.toml
as long as both dependabot
and poetry
support it.
I think there are two goals for this issue, with potentially quite different difficulty:
dependabot
simply doesn't touch the multiply-constrained dependency in poetry.lock
For 2., it would be helpful to know how (if?) dependabot handles environment markers in the other supported Python formats (requirements.txt
etc.).
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.
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 https://github.com/dependabot/dependabot-core/issues/2715#issuecomment-777435053, 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
: https://github.com/greschd/dependabot-poetry-multiple-constraints/pull/2Images of the diff or a link to the PR, issue, or logs
https://github.com/greschd/dependabot-poetry-multiple-constraints/pull/1
Smallest manifest that reproduces the issue
Almost minimal repository: https://github.com/greschd/dependabot-poetry-multiple-constraints