jazzband / pip-tools

A set of tools to keep your pinned Python dependencies fresh.
https://pip-tools.rtfd.io
BSD 3-Clause "New" or "Revised" License
7.6k stars 607 forks source link

Eventually implement support for the PEP 735 "dependency groups" #2062

Open webknjaz opened 4 months ago

webknjaz commented 4 months ago

What's the problem this feature will solve?

It's just a new source of deps and an extension to the first round of the pyproject.toml runtime deps resolution.

Describe the solution you'd like

$sbj. If somebody's interested in making a PoC, it's probably fine to start drafting something already. Need to wait for the PEP acceptance to actually merge it in, though.

Alternative Solutions

... not doing this?

Additional context

Refs:

chrysle commented 3 months ago

What are you planning to have for dependency group support? An option to collect only such dependencies, or alongside with normal and build deps? And the possibility to collect only specified dependency groups?

webknjaz commented 3 months ago

Same as #1960 attempted, just in the proper place. Semantically, dependency groups don't imply including runtime dependencies so they should definitely be collected and output separately. However, we shouldn't actively prevent combining them with other deps (runtime, or runtime+extra, or other dependency groups; though the latter seems to be covered by the PEP itself).

chrysle commented 3 months ago

However, we shouldn't actively prevent combining them with other deps

IIUC that would mean actually creating an option like --include-dependency-groups/--all-dependency-groups, next to --only-dependency-groups?

webknjaz commented 3 months ago

Aren't the past two the same?

chrysle commented 3 months ago

Aren't the past two the same?

Yes, this was unintended. Is the rest of my assumption valid?

webknjaz commented 3 months ago

I think so. It of course could be iterated on during a PoC review..