Bug 2458664 - scipy: FTBFS in Fedora Rawhide: test_gh_22681_finite_error: AssertionError
Summary: scipy: FTBFS in Fedora Rawhide: test_gh_22681_finite_error: AssertionError
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: scipy
Version: 45
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Siteshwar Vashisht
QA Contact: Fedora Extras Quality Assurance
URL: https://koschei.fedoraproject.org/pac...
Whiteboard:
Depends On:
Blocks: PYTHON3.15 F45FTBFS F46FTBFS, RAWHIDEFTBFS
TreeView+ depends on / blocked
 
Reported: 2026-04-15 12:10 UTC by Karolina Surma
Modified: 2026-08-17 14:33 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2026-04-15 12:10:19 UTC
Description of problem:
Package scipy fails to build from source in Fedora Rawhide.

Version-Release number of selected component (if applicable):
1.16.2-3.fc44

Steps to Reproduce:
koji build --scratch f45 scipy-1.16.2-3.fc44.src.rpm

Additional info:
This package is tracked by Koschei. See:
https://koschei.fedoraproject.org/package/scipy

Reproducible: Always

Actual Results:
________________ TestTanhSinh.test_gh_22681_finite_error[numpy] ________________
[gw3] linux -- Python 3.14.4 /usr/bin/python3
self = <scipy.integrate.tests.test_tanhsinh.TestTanhSinh object at 0x7ff67761dae0>
xp = <module 'scipy._lib.array_api_compat.numpy' from '/builddir/build/BUILD/scipy-1.16.2-build/BUILDROOT/usr/lib64/python3.14/site-packages/scipy/_lib/array_api_compat/numpy/__init__.py'>
    def test_gh_22681_finite_error(self, xp):
        # gh-22681 noted a case in which the error was NaN on some platforms;
        # check that this does in fact fail in CI.
        c1 = complex(12, -10)
        c2 = complex(12, 39)
        def f(t):
            return xp.sin(c1 * (1 - t) + c2 * t)
        a, b = xp.asarray(0., dtype=xp.float64), xp.asarray(1., dtype=xp.float64)
        ref = _tanhsinh(f, a, b, atol=0, rtol=0, maxlevel=10)
        assert xp.isfinite(ref.error)
        # Previously, tanhsinh would not detect convergence
        res = _tanhsinh(f, a, b, rtol=1e-14)
        assert res.success
        assert res.maxlevel < 5
>       xp_assert_close(res.integral, ref.integral, rtol=1e-15)
E       AssertionError: 
E       Not equal to tolerance rtol=1e-15, atol=0
E       
E       Mismatched elements: 1 / 1 (100%)
E       Max absolute difference among violations: 1.60208179e+15
E       Max relative difference among violations: 0.66889644
E        ACTUAL: array(-4.741191e+14+7.456345e+14j)
E        DESIRED: array(-4.741191e+14+2.347716e+15j)
scipy/integrate/tests/test_tanhsinh.py:764: AssertionError

Comment 1 Miro Hrončok 2026-05-20 12:42:22 UTC
Nikola, will you please be able to sort this out? Thanks.

Comment 2 Nikola Forró 2026-05-27 12:47:59 UTC
Sorry, this completely slipped under my radar. It seems the test failure is caused by a bug in glibc (incorrect sinh implementation), I'll try to report it or submit a fix. Do you want me to disable the test in the meantime?

Comment 3 Miro Hrončok 2026-05-27 17:37:20 UTC
Yes, see https://src.fedoraproject.org/rpms/scipy/pull-request/59

Comment 4 Fedora Admin user for bugzilla script actions 2026-08-05 22:36:50 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 5 Aoife Moloney 2026-08-17 14:33:42 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 45 development cycle.
Changing version to 45.


Note You need to log in before you can comment on or make changes to this bug.