Matches a full key variant (`cpython-3.13.0+freethreaded-linux-x86_64-gnu`) or a version with the `t` suffix (`3.13t`, `cpython@3.13.1t`).
(request: &str)
| 69 | /// Matches a full key variant (`cpython-3.13.0+freethreaded-linux-x86_64-gnu`) or a |
| 70 | /// version with the `t` suffix (`3.13t`, `cpython@3.13.1t`). |
| 71 | fn is_free_threaded_request(request: &str) -> bool { |
| 72 | if request.contains("+freethreaded") { |
| 73 | return true; |
| 74 | } |
| 75 | request.split(['-', '@']).any(|segment| { |
| 76 | let Some(version) = segment.strip_suffix('t') else { |
| 77 | return false; |
| 78 | }; |
| 79 | version.ends_with(|c: char| c.is_ascii_digit()) |
| 80 | }) |
| 81 | } |
| 82 | |
| 83 | #[cfg(test)] |
| 84 | mod tests { |
no outgoing calls
no test coverage detected