https://github.com/python/cpython/commit/2aa06a72537535915480761641cf50bd4123da88
commit: 2aa06a72537535915480761641cf50bd4123da88
branch: 3.13
author: Stefan Agner <[email protected]>
committer: Yhg1s <[email protected]>
date: 2026-10-25T06:28:51-07:00
summary:

[3.13] gh-159015: Fix test_math import on musl (#159016)

The 3.13 backport of gh-152563 compares the return value of
support.linked_to_musl() with a version tuple, but on 3.13 the helper
still returns a bool. On musl this raises TypeError at class definition
time, so test_math and test_cmath fail to import. Restore the previous
skip condition.

Co-authored-by: Claude Opus 5.5 <[email protected]>

files:
A Misc/NEWS.d/next/Tests/2026-10-08-10-27-15.gh-issue-159015.SYk8R8.rst
M Lib/test/test_math.py

diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py
index b678420e9cf1f9d..eac5a1c765b6df5 100644
--- a/Lib/test/test_math.py
+++ b/Lib/test/test_math.py
@@ -2743,7 +2743,7 @@ def test_fma_infinities(self):
     @unittest.skipIf(
         sys.platform.startswith(("freebsd", "wasi", "netbsd", "emscripten"))
         or (sys.platform == "android" and platform.machine() == "x86_64")
-        or (support.linked_to_musl() and support.linked_to_musl() < (1, 2, 
6)),  # gh-131032
+        or support.linked_to_musl(),  # gh-131032
         f"this platform doesn't implement IEE 754-2008 properly")
     def test_fma_zero_result(self):
         nonnegative_finites = [0.0, 1e-300, 2.3, 1e300]
diff --git 
a/Misc/NEWS.d/next/Tests/2026-10-08-10-27-15.gh-issue-159015.SYk8R8.rst 
b/Misc/NEWS.d/next/Tests/2026-10-08-10-27-15.gh-issue-159015.SYk8R8.rst
new file mode 100644
index 000000000000000..5b3cba900b672e2
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2026-10-08-10-27-15.gh-issue-159015.SYk8R8.rst
@@ -0,0 +1,3 @@
+Fix :mod:`!test.test_math` failing to import on musl-based systems. The
+skip condition of ``test_fma_zero_result`` compared the boolean returned by
+:func:`!test.support.linked_to_musl` with a version tuple.

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to