Bug 2349443 - python-astropy-iers-data fails to build with Python 3.14: 4 tests fail with KeyError: 'ra_in' and 'lon_in'
Summary: python-astropy-iers-data fails to build with Python 3.14: 4 tests fail with K...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-astropy-iers-data
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sergio Pascual
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2025-03-03 09:03 UTC by Karolina Surma
Modified: 2025-03-03 09:03 UTC (History)
3 users (show)

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


Attachments (Terms of Use)

Description Karolina Surma 2025-03-03 09:03:42 UTC
python-astropy-iers-data fails to build with Python 3.14.0a5.

______________________________ test_fk4_no_e_fk4 _______________________________

self = <Row index=22>
# This file was generated with the ref_fk4_no_e_fk4.py script, and the reference values were computed u...-------
                 B1976.41,258.283303492,-30.1025933842,258.283404615,-30.1026049901,258.28320237,-30.1025817782
item = 'ra_in'

    def __getitem__(self, item):
        try:
            # Try the most common use case of accessing a single column in the Row.
            # Bypass the TableColumns __getitem__ since that does more testing
            # and allows a list of tuple or str, which is not the right thing here.
>           out = OrderedDict.__getitem__(self._table.columns, item)[self._index]
E           KeyError: 'ra_in'

/usr/lib64/python3.14/site-packages/astropy/table/row.py:54: KeyError

During handling of the above exception, another exception occurred:

    def test_fk4_no_e_fk4():
        lines = get_pkg_data_contents("data/fk4_no_e_fk4.csv").split("\n")
        t = Table.read(lines, format="ascii", delimiter=",", guess=False)
    
        if N_ACCURACY_TESTS >= len(t):
            idxs = range(len(t))
        else:
            idxs = np.random.randint(len(t), size=N_ACCURACY_TESTS)
    
        diffarcsec1 = []
        diffarcsec2 = []
        for i in idxs:
            # Extract row
            r = t[int(i)]  # int here is to get around a py 3.x astropy.table bug
    
            # FK4 to FK4NoETerms
            c1 = FK4(
>               ra=r["ra_in"] * u.deg, dec=r["dec_in"] * u.deg, obstime=Time(r["obstime"])
            )

/usr/lib64/python3.14/site-packages/astropy/coordinates/tests/accuracy/test_fk4_no_e_fk4.py:39: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.14/site-packages/astropy/table/row.py:64: in __getitem__
    out = self._table.columns[item][self._index]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <TableColumns names=('# This file was generated with the ref_fk4_no_e_fk4.py script, and the reference values were computed using AST')>
item = 'ra_in'

    def __getitem__(self, item):
        """Get items from a TableColumns object.
    
        ::
    
          tc = TableColumns(cols=[Column(name='a'), Column(name='b'), Column(name='c')])
          tc['a']  # Column('a')
          tc[1] # Column('b')
          tc['a', 'b'] # <TableColumns names=('a', 'b')>
          tc[1:3] # <TableColumns names=('b', 'c')>
        """
        if isinstance(item, str):
>           return OrderedDict.__getitem__(self, item)
E           KeyError: 'ra_in'

/usr/lib64/python3.14/site-packages/astropy/table/table.py:267: KeyError

______________________________ test_galactic_fk4 _______________________________

self = <Row index=30>
# This file was generated with the ref_galactic_fk4.py script, and the reference values were computed u...-------
         J2022.20,B1972.41,61.5291328053,18.6403709997,277.730191309,33.3416109651,174.063892959,-24.5412790814
item = 'lon_in'

    def __getitem__(self, item):
        try:
            # Try the most common use case of accessing a single column in the Row.
            # Bypass the TableColumns __getitem__ since that does more testing
            # and allows a list of tuple or str, which is not the right thing here.
>           out = OrderedDict.__getitem__(self._table.columns, item)[self._index]
E           KeyError: 'lon_in'

/usr/lib64/python3.14/site-packages/astropy/table/row.py:54: KeyError

During handling of the above exception, another exception occurred:

    def test_galactic_fk4():
        lines = get_pkg_data_contents("data/galactic_fk4.csv").split("\n")
        t = Table.read(lines, format="ascii", delimiter=",", guess=False)
    
        if N_ACCURACY_TESTS >= len(t):
            idxs = range(len(t))
        else:
            idxs = np.random.randint(len(t), size=N_ACCURACY_TESTS)
    
        diffarcsec1 = []
        diffarcsec2 = []
        for i in idxs:
            # Extract row
            r = t[int(i)]  # int here is to get around a py 3.x astropy.table bug
    
            # Galactic to FK4
>           c1 = Galactic(l=r["lon_in"] * u.deg, b=r["lat_in"] * u.deg)

/usr/lib64/python3.14/site-packages/astropy/coordinates/tests/accuracy/test_galactic_fk4.py:35: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python3.14/site-packages/astropy/table/row.py:64: in __getitem__
    out = self._table.columns[item][self._index]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <TableColumns names=('# This file was generated with the ref_galactic_fk4.py script, and the reference values were computed using AST')>
item = 'lon_in'

    def __getitem__(self, item):
        """Get items from a TableColumns object.
    
        ::
    
          tc = TableColumns(cols=[Column(name='a'), Column(name='b'), Column(name='c')])
          tc['a']  # Column('a')
          tc[1] # Column('b')
          tc['a', 'b'] # <TableColumns names=('a', 'b')>
          tc[1:3] # <TableColumns names=('b', 'c')>
        """
        if isinstance(item, str):
>           return OrderedDict.__getitem__(self, item)
E           KeyError: 'lon_in'

/usr/lib64/python3.14/site-packages/astropy/table/table.py:267: KeyError

FAILED ../../tests/accuracy/test_fk4_no_e_fk4.py::test_fk4_no_e_fk4 - KeyErro...
FAILED ../../tests/accuracy/test_fk4_no_e_fk5.py::test_fk4_no_e_fk5 - KeyErro...
FAILED ../../tests/accuracy/test_galactic_fk4.py::test_galactic_fk4 - KeyErro...
FAILED ../../tests/accuracy/test_icrs_fk5.py::test_icrs_fk5 - KeyError: 'ra_in'

https://docs.python.org/3.14/whatsnew/3.14.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08670996-python-astropy-iers-data/

For all our attempts to build python-astropy-iers-data with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/python-astropy-iers-data/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.


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