Can Poetry Auto‑Resolve Conflicting Dependencies When Adding a New Package?
0 reputation · 16 Feb 2026, 15:14 UTC
Goal
When a project already has a poetry.lock that pins specific dependency versions, a user may want to add a new package that introduces a version constraint that conflicts with one of those pinned dependencies. The intended outcome is to have Poetry reconcile the new requirement and update the lock file accordingly.
Constraints and Uncertainty
Poetry’s current behavior raises a conflict error and leaves the lock file unchanged if the new dependency’s constraint cannot be satisfied by the existing locked versions. It is unclear whether Poetry will attempt to adjust other dependencies automatically or if the user must intervene manually. Additionally, the interaction between the --no-dev flag and optional dependencies in the lock file remains undocumented, raising questions about which entries are preserved during a conflict resolution attempt.
Questions
- Does Poetry automatically try to resolve a conflict by adjusting other dependencies when
poetry addis run? - Which steps does Poetry take if it cannot find a compatible set of versions, and can the user force a partial update without running
poetry update? - Can the
--no-devflag influence the conflict resolution process when optional dependencies are involved?