Ignore pre-release segments when discovering via requires-python (#6813)

## Summary

`3.13.0b0` should be allowed by `>=3.13`.

Closes #6798.
This commit is contained in:
Charlie Marsh
2024-08-29 12:45:29 -04:00
committed by GitHub
parent e3d5d3d26d
commit f046e54c64
+4 -1
View File
@@ -1441,7 +1441,10 @@ impl VersionRequest {
interpreter.python_patch(),
) == (*major, *minor, *patch)
}
Self::Range(specifiers) => specifiers.contains(interpreter.python_version()),
Self::Range(specifiers) => {
let version = interpreter.python_version().only_release();
specifiers.contains(&version)
}
}
}