Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions crates/uv-distribution-filename/src/wheel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
4 changes: 3 additions & 1 deletion crates/uv-platform-tags/src/abi_tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Loading