Bug 2458664

Summary: scipy: FTBFS in Fedora Rawhide: test_gh_22681_finite_error: AssertionError
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: scipyAssignee: Nikola Forró <nforro>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, david08741, mhroncok, nforro, psimovec, python-packagers-sig
Target Milestone: ---Flags: mhroncok: needinfo? (nforro)
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
URL: https://koschei.fedoraproject.org/package/scipy
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2412434, 2433833    

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.