You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issues of this repo and believe that this is not a duplicate.
I have searched the FAQ and general documentation and believe that my question is not already covered.
Feature Request
Seems that poetry, even if in dedicated groups, build the dependencies tree based on all groups.
Seems fair since, depending on your needs, you install just "lint" group, or "formatter" group or two groups, with main, without main, run those groups with only one python version in contrary to the package itself etc...
But, sometimes, it constrains the users and hit dependency hell even if they use a group only for test/lint etc... or doesn't let them use a recent version of a package because one of the packages require an old version for a cross dependency.
As an example, flake8 and its dependency on importlib-metadata < 5 who constrains many packages.
Having something similar as depends_on = [] for groups to let the lock file be built based on group dependency and let users have more flexibility would be really convenient.
lint / typing are optional and not included in build
lint is only intended to be executed with python 3.7 or 3.8
typing is intended to be executed with the same python versions the project has
lint is isolated, so dependencies required by flake8 (importlib-metadata<5) doesn't influence other packages in other groups if they don't depend on lint
poetry install --with lint will fail because lint does not have main in depends_on
when doing poetry install --only typing, it will install main too since it depends on it
Hope it will see the light in poetry someday and other users will welcome this Feature Request.
Regards,
The text was updated successfully, but these errors were encountered:
This is 80% a duplicate of #1168, and also touches on #5037. I think you're also mixing in a request for groups that get written to the wheel metadata -- currently only the main group can ever end up in the built metadata.
I'm going to close this as a duplicate, but feel free to ask questions about the other FRs and look for an issue for 'groups in metadata'/create a FR for that if it doesn't already exist.
I already searched but was not able to found #5037 that is closer than #1168 in the goal expected.
And indeed, I mixed up the "optional" option with what is indeed included in metadata
Feature Request
Seems that poetry, even if in dedicated groups, build the dependencies tree based on all groups.
Seems fair since, depending on your needs, you install just "lint" group, or "formatter" group or two groups, with main, without main, run those groups with only one python version in contrary to the package itself etc...
But, sometimes, it constrains the users and hit dependency hell even if they use a group only for test/lint etc... or doesn't let them use a recent version of a package because one of the packages require an old version for a cross dependency.
As an example, flake8 and its dependency on
importlib-metadata < 5
who constrains many packages.Having something similar as
depends_on = []
for groups to let the lock file be built based on group dependency and let users have more flexibility would be really convenient.As an example :
In this example :
importlib-metadata<5
) doesn't influence other packages in other groups if they don't depend on lintpoetry install --with lint
will fail becauselint
does not have main independs_on
poetry install --only typing
, it will installmain
too since it depends on itHope it will see the light in poetry someday and other users will welcome this Feature Request.
Regards,
The text was updated successfully, but these errors were encountered: