Properly apply constraints in venv audit (#1956)
## Summary We were applying every constraint to every dependency. This is "harmless" in practice since this is just an optimization, but we thus had false negatives ~every time which could lead to wasted work.
This commit is contained in:
@@ -334,6 +334,10 @@ impl<'a> SitePackages<'a> {
|
||||
|
||||
// Validate that the installed version satisfies the constraints.
|
||||
for constraint in constraints {
|
||||
if constraint.name != requirement.name {
|
||||
continue;
|
||||
}
|
||||
|
||||
if !constraint.evaluate_markers(self.venv.interpreter().markers(), &[]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user