Validate dependency groups even when --frozen is present (#11499)

## Summary

We now use the same strategy as for extras, validating against the
lockfile instead of the `pyproject.toml`.

Closes https://github.com/astral-sh/uv/issues/10882.
This commit is contained in:
Charlie Marsh 2025-02-14 10:54:28 -05:00 committed by GitHub
parent 71bda82b08
commit f001605505
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 168 additions and 161 deletions

View file

@ -2622,6 +2622,11 @@ impl Package {
pub fn provides_extras(&self) -> Option<&Vec<ExtraName>> {
self.metadata.provides_extras.as_ref()
}
/// Returns the dependency groups the package provides, if any.
pub fn dependency_groups(&self) -> &BTreeMap<GroupName, BTreeSet<Requirement>> {
&self.metadata.dependency_groups
}
}
/// Attempts to construct a `VerbatimUrl` from the given normalized `Path`.