Skip to content

Add pgo-dependency-group configuration #3278

Description

@davidhewitt

I noticed that pgo.rs has some logic for installing a dev dependency group via pip. This looks super useful! However I couldn't use this in the pydantic-core repository because uv is present and the dependency group is called testing-extra.

I had two suggestions for this feature:

  • Hacking around on pydantic-core I was able to make the following work for uv: uv export --group testing-extra --no-emit-workspace --no-hashes --no-header --no-annotate -o target/pgo-requirements.txt && uv pip install -r target/pgo-requirements.txt.

    I think going via export into a temporary requirements.txt was the best way to respect the lockfile and I couldn't use uv sync because it wiped the interpreter ( uv sync --active can recreate active venv astral-sh/uv#15603).

    ... it's hopefully possible to run these two commands internally in maturin to support the uv install?

  • It would be great to expose a config pgo-dependency-group, defaulting to dev, so that pydantic-core can use this :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions