-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-E
ignored when using poetry.group
#4891
Comments
Hello @Conchylicultor, this is expected. Dependency groups and extras are different concept. You cannot mix them. Extras are a way in thy python world to define a set of dependencies, that will bring extra functionality to your package during run time. Dependency groups are a concept by poetry to define different set of dependency that you only need during development, like linter or testing framework. So you must ask yourself: Do I need it this dependencies during runtime or only during development? For the first case use extras, for the later use dependency groups. fin swimmer |
Thanks for the fast answer, However, your answer seems to contradict the doc you linked:
The doc say those deps can be used for tests but not that they have to. Additionally, even global dependencies have a "default" group, which indicates group are not limited to developpement. From the doc:
Additionally, other users seems to understand like me that |
At minima, |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Issue
When
[tool.poetry.extras]
is used to refer to deps defined inside[tool.poetry.group.group0.dependencies]
, those deps are ignored.Reproduction instrutions:
I would expect the command to install
tmp-poetry[numpy_extra]
which should installnumpy
. However, this silently fail to install the package:Display:
The extra deps is ignored and not installed,
poetry show
will display nothing.poetry run python -c "import numpy"
will fail withModuleNotFoundError
Note: removing the groups and using instead
numpy={version="*", optional=true}
will work.The text was updated successfully, but these errors were encountered: