Use a dedicated message for incompatible Python versions in wheel ABI tags (#8363)

Part of https://github.com/astral-sh/uv/issues/2777

I noticed we're seeing "Python ABI" _a lot_ in error messages which I
did not expect. This improves a common case by being a little more
specific.
This commit is contained in:
Zanie Blue 2024-10-20 11:14:11 -05:00 committed by GitHub
parent bcc52ed108
commit fff2094a35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 2 deletions

View file

@ -563,7 +563,9 @@ impl VersionMapLazy {
// Check if the wheel is compatible with the `requires-python` (i.e., the Python ABI tag
// is not less than the `requires-python` minimum version).
if !self.requires_python.matches_wheel_tag(filename) {
return WheelCompatibility::Incompatible(IncompatibleWheel::Tag(IncompatibleTag::Abi));
return WheelCompatibility::Incompatible(IncompatibleWheel::Tag(
IncompatibleTag::AbiPythonVersion,
));
}
// Break ties with the build tag.