Bug 2336966

Summary: python-periodictable: FTBFS in Fedora Rawhide: AttributeError: `np.NaN` was removed in the NumPy 2.0 release. Use `np.nan` instead.
Product: [Fedora] Fedora Reporter: Karolina Surma <ksurma>
Component: python-periodictableAssignee: Antonio T. sagitter <trpost>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: trpost
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
URL: https://koschei.fedoraproject.org/package/python-periodictable
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-01-10 20:05:10 UTC 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: 2300528, 2322407, 2332159    

Description Karolina Surma 2025-01-10 16:16:13 UTC
Description of problem:
Package python-periodictable fails to build from source in Fedora Rawhide.

Version-Release number of selected component (if applicable):
1.6.1-10.fc41

Steps to Reproduce:
koji build --scratch f42 python-periodictable-1.6.1-10.fc41.src.rpm

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

Reproducible: Always

Actual Results:  
___________________ ERROR collecting periodictable/fasta.py ____________________
periodictable/fasta.py:231: in <module>
    H2O_SLD = neutron_sld("H2O")[0]
periodictable/nsf.py:993: in neutron_sld
    return neutron_scattering(*args, **kw)[0]
periodictable/util.py:96: in _require_kwds
    return function(*args, **kw)
periodictable/nsf.py:888: in neutron_scattering
    if not element.neutron.has_sld():
periodictable/core.py:110: in getfn
    loader()
periodictable/__init__.py:102: in _load_neutron
    nsf.init(elements)
periodictable/nsf.py:547: in init
    b_c = nsf.b_c if nsf.b_c is not None else np.NaN
/usr/lib64/python3.13/site-packages/numpy/__init__.py:400: in __getattr__
    raise AttributeError(
E   AttributeError: `np.NaN` was removed in the NumPy 2.0 release. Use `np.nan` instead.