Fix wheel rejections on freethreading+debug builds (#17812)

This is the minimal fix for
https://github.com/astral-sh/uv/issues/17635. We still display the wheel
without debug, but it unbreaks freethreading+debug in general.
This commit is contained in:
konsti
2026-02-02 16:13:11 +01:00
committed by GitHub
parent c8eebb59ab
commit f5a4fee20b
2 changed files with 12 additions and 1 deletions
@@ -470,4 +470,13 @@ mod tests {
).unwrap();
insta::assert_snapshot!(filename.cache_key(), @"1.2.3.4.5.6.7.8.9.0.1.2.3.4.5.6.7.8.9.0.1.2.1.2-80bf8598e9647cf7");
}
/// Don't drop the freethreading tag when there is a debug tag.
#[test]
fn freethreading_debug() {
let filename = "correctionlib-2.8.0-cp314-cp314td-macosx_26_0_arm64.whl";
let parsed = WheelFilename::from_str(filename).unwrap();
// TODO(konsti): We should preserve the debug tag too, but that requires cache changes.
insta::assert_snapshot!(parsed.to_string(), @"correctionlib-2.8.0-cp314-cp314t-macosx_26_0_arm64.whl");
}
}
+3 -1
View File
@@ -208,8 +208,10 @@ impl FromStr for AbiTag {
// Ex) `cp39m`, `cp310t`
let version_end = cp.find(|c: char| !c.is_ascii_digit()).unwrap_or(cp.len());
let version_str = &cp[..version_end];
let abi_suffixes = &cp[version_end..];
let (major, minor) = parse_python_version(version_str, "CPython", s)?;
let gil_disabled = cp.ends_with('t');
// TODO(konsti): Handle all ABI tags
let gil_disabled = abi_suffixes.contains('t');
Ok(Self::CPython {
gil_disabled,
python_version: (major, minor),