Bug report
Bug description:
The 3.13 backport of gh-152563 (#155753, commit 8e85d73) changed the skip condition of FMATests.test_fma_zero_result in Lib/test/test_math.py to:
or (support.linked_to_musl() and support.linked_to_musl() < (1, 2, 6)), # gh-131032
On main/3.14, support.linked_to_musl() returns the musl version as a tuple. On the 3.13 branch it still returns a plain bool (return ('musl' in stdout)), so on a musl-based system the condition evaluates True < (1, 2, 6) and raises:
TypeError: '<' not supported between instances of 'bool' and 'tuple'
Because this happens inside the @unittest.skipIf(...) decorator, it is raised at class definition time and test_math fails to import entirely. test_cmath imports from test.test_math, so it fails too. On glibc the expression short-circuits on False, so it doesn't show up there.
This is a regression in 3.13.16. A visible consequence: building 3.13.16 on Alpine Linux with --enable-optimizations fails, because both modules are part of the PGO training set:
[ 8/43] test_cmath failed (uncaught exception)
[27/43] test_math failed (uncaught exception)
Total test files: run=43/43 failed=2
Result: FAILURE
make: *** [Makefile:911: profile-run-stamp] Error 2
To fix it, either restore the previous or support.linked_to_musl(), condition on 3.13, or also backport the linked_to_musl() change that returns a version tuple.
Seen in Home Assistant's Alpine-based Python images: home-assistant/docker-base#402
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Linked PRs
Bug report
Bug description:
The 3.13 backport of gh-152563 (#155753, commit 8e85d73) changed the skip condition of
FMATests.test_fma_zero_resultinLib/test/test_math.pyto:On
main/3.14,support.linked_to_musl()returns the musl version as a tuple. On the 3.13 branch it still returns a plainbool(return ('musl' in stdout)), so on a musl-based system the condition evaluatesTrue < (1, 2, 6)and raises:Because this happens inside the
@unittest.skipIf(...)decorator, it is raised at class definition time andtest_mathfails to import entirely.test_cmathimports fromtest.test_math, so it fails too. On glibc the expression short-circuits onFalse, so it doesn't show up there.This is a regression in 3.13.16. A visible consequence: building 3.13.16 on Alpine Linux with
--enable-optimizationsfails, because both modules are part of the PGO training set:To fix it, either restore the previous
or support.linked_to_musl(),condition on 3.13, or also backport thelinked_to_musl()change that returns a version tuple.Seen in Home Assistant's Alpine-based Python images: home-assistant/docker-base#402
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Linked PRs