From 3a8cea32a64184c3465c8126c0e7704e66885aea Mon Sep 17 00:00:00 2001 From: Chris Novakovic Date: Fri, 10 Oct 2025 10:02:42 +0100 Subject: [PATCH 1/2] Improve coverage speed for musl and free-threaded Pythons PyPI has pre-built architecture-specific coverage wheels for Python >= 3.13 interpreters built with free threading support and Python >= 3.9 interpreters linked to musl. Include them in the coverage multi-arch wheel so they benefit from native-speed tracing under `plz cover`. --- third_party/python/BUILD | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/third_party/python/BUILD b/third_party/python/BUILD index 895a53f..14884e0 100644 --- a/third_party/python/BUILD +++ b/third_party/python/BUILD @@ -133,7 +133,9 @@ _coverage_tags = { "macosx_10_13_x86_64": [ ["cp312", "cp312"], ["cp313", "cp313"], + ["cp313", "cp313t"], ["cp314", "cp314"], + ["cp314", "cp314t"], ], }, "darwin_arm64": { @@ -143,7 +145,9 @@ _coverage_tags = { ["cp311", "cp311"], ["cp312", "cp312"], ["cp313", "cp313"], + ["cp313", "cp313t"], ["cp314", "cp314"], + ["cp314", "cp314t"], ], }, "linux_amd64": { @@ -153,7 +157,19 @@ _coverage_tags = { ["cp311", "cp311"], ["cp312", "cp312"], ["cp313", "cp313"], + ["cp313", "cp313t"], ["cp314", "cp314"], + ["cp314", "cp314t"], + ], + "musllinux_1_2_x86_64": [ + ["cp39", "cp39"], + ["cp310", "cp310"], + ["cp311", "cp311"], + ["cp312", "cp312"], + ["cp313", "cp313"], + ["cp313", "cp313t"], + ["cp314", "cp314"], + ["cp314", "cp314t"], ], }, "linux_arm64": { @@ -163,7 +179,19 @@ _coverage_tags = { ["cp311", "cp311"], ["cp312", "cp312"], ["cp313", "cp313"], + ["cp313", "cp313t"], + ["cp314", "cp314"], + ["cp314", "cp314t"], + ], + "musllinux_1_2_aarch64": [ + ["cp39", "cp39"], + ["cp310", "cp310"], + ["cp311", "cp311"], + ["cp312", "cp312"], + ["cp313", "cp313"], + ["cp313", "cp313t"], ["cp314", "cp314"], + ["cp314", "cp314t"], ], }, # There are no pre-built architecture-specific wheels for FreeBSD, so fall back to the pure-Python one. From 3a6a1918acceff0b40a32b2011140f538030cbec Mon Sep 17 00:00:00 2001 From: Chris Novakovic Date: Fri, 10 Oct 2025 11:31:52 +0100 Subject: [PATCH 2/2] Exclude cp39 and cp310 on musllinux --- third_party/python/BUILD | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/third_party/python/BUILD b/third_party/python/BUILD index 14884e0..b6e0c73 100644 --- a/third_party/python/BUILD +++ b/third_party/python/BUILD @@ -162,8 +162,11 @@ _coverage_tags = { ["cp314", "cp314t"], ], "musllinux_1_2_x86_64": [ - ["cp39", "cp39"], - ["cp310", "cp310"], + # The SOABI used by musl-linked Python 3.9 and 3.10 interpreters is "x86_64-linux-gnu", making + # it indistinguishable from the SOABI used by glibc-linked interpreters (and causing file name + # collisions for the tracer shared object in the multi-arch wheel). Because of this, we aren't + # able to provide native-speed tracing support for musl-linked Python 3.9 and 3.10 + # interpreters. ["cp311", "cp311"], ["cp312", "cp312"], ["cp313", "cp313"], @@ -184,8 +187,11 @@ _coverage_tags = { ["cp314", "cp314t"], ], "musllinux_1_2_aarch64": [ - ["cp39", "cp39"], - ["cp310", "cp310"], + # The SOABI used by musl-linked Python 3.9 and 3.10 interpreters is "x86_64-linux-gnu", making + # it indistinguishable from the SOABI used by glibc-linked interpreters (and causing file name + # collisions for the tracer shared object in the multi-arch wheel). Because of this, we aren't + # able to provide native-speed tracing support for musl-linked Python 3.9 and 3.10 + # interpreters. ["cp311", "cp311"], ["cp312", "cp312"], ["cp313", "cp313"],