So far I have used poetry extras to install optional dependencies. For instance, in pyproject.toml
I have defined
[tool.poetry.dependencies]
...
jupyter = { version = "^1.0.0", optional = true }
[tool.poetry.extras]
notebooks = ["jupyter"...]
and then I could install optional dependencies with poetry install -E notebooks
.
Now I can see that poetry is going to support groups. My intuition is that the example above could be replaced with:
[tool.poetry.group.notebooks.dependencies]
jupyter = "^1.0.0"...
and then installed with poetry install --with notebooks
.
Now I wonder how groups relate to extras.
- Are groups just a syntactic sugar that is going to simplify definition of optional dependencies?
- If yes, will extras be depracated in favour of groups?
- If not, what's the difference between them and how both can coexist?