Reputation: 1711
I am using Python Poetry to manage dependencies in a Python project. I want to enforce a minimum Poetry version to avoid unnecessary changes in the poetry.lock
file in version control.
I tried updating it in the [build-system]
table of the pyproject.toml
file but it works with lower versions as well.
Is there a way by which I can enforce a minimum Poetry version in a project?
Upvotes: 7
Views: 929
Reputation: 2622
This can be done with the following notation in pyproject.toml
:
[tool.poetry]
requires-poetry = ">=2.0.0"
This feature was added in this change and released in Poetry version 2.0.0 on 2025-01-05. Here is the documentation.
Upvotes: 1