Skip to content

Support PEP-735 "dependency-groups" in pyproject.toml #857

@itcarroll

Description

@itcarroll

Checklist

  • I added a descriptive title
  • I searched open requests and couldn't find a duplicate

What is the idea?

PEP 735 is a long-awaited upgrade to the pyproject.toml file specification that adds a table for groups of dependencies. These "dependency-groups" are distinct from "optional-dependencies". In the same way that conda-lock supports optional dependencies with the --extras flag, it would make sense to follow uv and support dependency groups with a --group flag.

Why is this needed?

The pyproject.toml file can now include a table for dependencies that conda-lock does not recognize.

What should happen?

When a dependency-group table exists in a pyproject.toml file, then conda-lock should include the listed dependencies when called to lock, render, and install while allowing for customization. I believe replicating the behavior of --extras will work with a new flag for --group. By default, locking would solve for all dependencies (including all extras and groups) and installing includes only requested dependencies (asked for with --extras and --group). I'm not entirely sure about render...

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions