Reduce WheelFilename to 48 bytes (#10583)

## Summary

Based on some advice from @konstin.
This commit is contained in:
Charlie Marsh
2025-01-14 09:49:17 -05:00
committed by GitHub
parent e3f6b9c5f3
commit 24a5920739
16 changed files with 379 additions and 227 deletions
+2 -2
View File
@@ -380,12 +380,12 @@ impl RequiresPython {
/// It is meant to filter out clearly unusable wheels with perfect specificity and acceptable
/// sensitivity, we return `true` if the tags are unknown.
pub fn matches_wheel_tag(&self, wheel: &WheelFilename) -> bool {
wheel.abi_tag.iter().any(|abi_tag| {
wheel.abi_tags().iter().any(|abi_tag| {
if *abi_tag == AbiTag::Abi3 {
// Universal tags are allowed.
true
} else if *abi_tag == AbiTag::None {
wheel.python_tag.iter().any(|python_tag| {
wheel.python_tags().iter().any(|python_tag| {
// Remove `py2-none-any` and `py27-none-any` and analogous `cp` and `pp` tags.
if matches!(
python_tag,