There wasn’t strong objections, but there wasn’t strong support either. In PEP 751: one last time - #16 by radoering, @radoering said they may use it in Poetry if we came up with a solution. uv has already said they don’t have a need for this feature. You asked a clarifying question in PEP 751: one last time - #22 by frostming and which I answered in PEP 751: one last time - #26 by brettcannon but then I never heard back from you. So that’s at best a -1, +0, and a +0 for a major feature which wasn’t enough to push me into trying to implement it.
But based on what you’re saying here you I would consider your vote for the feature a +1. As such, here is what I’m willing to do:
- If you, @frostming , are willing to say PDM will use such a feature for supporting extras and dependency groups so PDM will standardize on this format for its lock file format
- You, @radoering , and me can come up with an approach we are all happy with
Then I will try to bring back in extras and dependency group support in some way (I think I know how I would want to do it; see below).
I know, and that’s why rejecting this part the saddest rejection for me.
To be clear, the PEP has the file name be pylock.toml
. If you want a file name change that’s a separate discussion.
I can plan to add something.
Thanks so much!
I didn’t see anything in the PR notes that suggest I need to change anything in the PEP, but if I overlooked anything then please let me know!
I would agree with that if the direct_url.json
spec didn’t say wheels are possible:
When
url
refers to a source archive or a wheel
So that tells me that a wheel could be a direct install. That’s why I left direct
as a top-level key in packages
.
(It also is a bit ambiguous when it comes to sdists compared to a source tree, but maybe “source” is meant to cover both cases in that sentence? It doesn’t affect the PEP as-is based on how it’s currently written.)
Going with the assumption that @frostming replies with what’s necessary to have a conversation about how to support extras and dependency groups, I’m going to start the conversation here.
I think the best solution is to introduce extras
in packages.marker
, treat it as a container and not a single value/string, and introduce dependency_groups
which would also be treated as a container.
Having extras
instead of extra
is because extra
already has semantics where it is expected to be used with just a single string.
The container bit is specifically so that you can use in
and not in
in packages.marker
since you need to be able to handle the full Boolean logic of extras and/or dependency groups; I think it makes more sense to say e.g. 'extra-1' in extras and 'extra-2' not in extras
than try to magically make 'extra-1' == extras and 'extra-2' != extras
mean something when you have multiple extras specified. This does require a change to ‘packaging’ since it only expects to work with string values for markers.
The introduction of dependency_groups
is because we simply have no way to express that concept in a marker right now.
As you can see, this expands the PEP to start messing with dependency specifiers and that’s not a small thing and thus not something I want to do unless it’s going to truly have an impact.