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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With