-
Notifications
You must be signed in to change notification settings - Fork 206
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
Add support for Python dependency groups #2256
Comments
Yeah I think we should support, we could make an environment per dependency-group, or something else. The most interesting thing is this part of the PEP is:
If you want to mix and match dependency groups in the same environment that would pose some problems. |
Hi there, PEP 735 author here! 👋
To make sure that this is clear, the spec doesn't say anything to forbid a tool from having tighter constraints on dependency groups. For example, I'm aware that poetry requires that all dependency groups are mutually compatible. So you don't need to support this if it poses a problem -- but that does put you in a position of having to tell your users what the behavior is (e.g., "it will fail when you try to lock dependencies"). It's possible that some users will misread the spec as saying that "tools are required to support this usage". But it's much more open than that, "tools should think about the fact that the spec doesn't protect against groups conflicting." I hope that perspective helps! |
@tdejager , I think the dependency groups being composable, they should rather be mapped to features, as the current extras are. |
Logged a similar request against the pyproject-toml crate. Better to handle deserialisation there. |
@sirosen thank you for the reply and kind words :)! Great to see you here! @olivier-lacroix I see that makes sense! We would still need to think if we want to instantiate some of these features by default in an evironment. Not sure yet! |
Started by implementing the group recursion in the pyproject-toml crate PyO3/pyproject-toml-rs#26 note: Maybe it would make sense to implement a similar logic to resolve optional extras that include self references @tdejager , this now means that adding a pypi dependency to a feature when using a
We should most likely make sure dependency groups and optional extras have no overlapping names. Let me know what you think! |
Problem description
PEP 735 recently got accepted (see #2211 (comment)). It can be used as a mechanism for defining Python dependencies for the developer environment without exposing them in the built distribution. I expect this will be quickly adopted by Python package managers, see e.g. python-poetry/poetry#9751, astral-sh/uv#8090, pypa/pip#12963.
Would it be possible to include dependency groups in the Pixi lock file and recognize it in features, similarly like how Pixi handles
optional-dependencies
?The text was updated successfully, but these errors were encountered: