They don’t need to - the resolver evaluates markers based on the requirements/dependencies. The constraints just restrict the package versions to the specified values.
Update - they do (thanks @fungi). Sorry for the misinformation, I’d misunderstood your question.
Ah, defaulting to PyPI is what caused me to think they weren’t there. Thanks.
OK. It apparently records the filename and the index. So you do still need to look up the actual URL via the index, but I don’t know if you’d consider that significant. I’m not sure if I do - we’re at the point of discussing auditability now, and I’m not an expert in what’s acceptable.
But index lookup, and filtering it to a list of known files, is a side issue compared to my main point here, which is that if the installer still has to do a full dependency resolution (regardless of whether it’s on the full index or a filtered one) then that’s not (to me, at least) “locking” the solution. And I remain sympathetic to the idea that a “just install these files” style of locking, like this proposal, is a valid and useful thing to want. Maybe there’s also a need for a “restrict the resolver to only considering these files” form of “locking” as a separate proposal, but:
- No-one has yet put forward such a proposal, and
- If we have two separate concepts, we urgently need to change our terminology so that we’re not calling both of them “locking”.
@brettcannon my view (speaking as potential PEP delegate) is that your proposal is based around the idea of a lockfile that says “here’s a list of distribution files - download and install them”, and is focused on auditability and a limited form of reproducibility (where by “limited” I mean “sdists muddy the water a bit”). And that you consider the “here’s a list of distribution files - go and resolve the stated requirements using only what’s on this list” approach as out of scope. I’m happy to support that position, on the understanding that:
- You explicitly describe in the PEP the two models, and you clearly state which one your proposal is addressing.
- You come up with some formal terminology to distinguish the two cases. I’m not so naive as to think that we’ll stop people calling them both “lockfiles” but I want the PEP at least to address the question of “how do we talk about this” precisely.
If someone wants to propose a “list the files you apply a resolver to” specification, I’ll happily consider that as an independent proposal. I’m not ecstatic about having two separate standards here, but I don’t want this work to fail yet again because we’re talking about multiple different things and never getting consensus or clarity as a result. Also, if someone has an idea for a “merged” approach which somehow addresses both models, please speak up! But be prepared for pushback - I’m pretty certain that trying to reconcile these two different views is what’s caused all of the previous proposals to fail.
@charliermarsh - thanks for pushing this question. I think we’ve spotted an important distinction here that we wouldn’t otherwise have identified, and that’s a significant step.