ejeschke / ginga

The Ginga astronomical FITS file viewer
BSD 3-Clause "New" or "Revised" License
121 stars 77 forks source link

Fix astropy ASDF deprecation warning #999

Closed ejeschke closed 2 years ago

ejeschke commented 2 years ago

We are getting the following error now in builds:

==================================== ERRORS ====================================
________________ ERROR collecting ginga/tests/test_ImageView.py ________________
ginga/tests/test_ImageView.py:5: in <module>
    from ginga import AstroImage
ginga/AstroImage.py:14: in <module>
    from ginga.util import wcs, wcsmod
ginga/util/wcsmod/__init__.py:95: in <module>
    if use(name, raise_err=False):
ginga/util/wcsmod/__init__.py:74: in use
    my_import(modname, path)
ginga/misc/ModuleManager.py:32: in my_import
    mod = importlib.import_module(name)
/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
ginga/util/wcsmod/wcs_astropy.py:7: in <module>
    import astropy.wcs as pywcs
/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/astropy/wcs/__init__.py:26: in <module>
    from .wcs import *
/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/astropy/wcs/wcs.py:56: in <module>
    from .wcsapi.fitswcs import FITSWCSAPIMixin, SlicedFITSWCS
/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/astropy/wcs/wcsapi/fitswcs.py:11: in <module>
    from astropy.coordinates import SpectralCoord, Galactic, ICRS
/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/astropy/coordinates/__init__.py:16: in <module>
    from .builtin_frames import *
/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/astropy/coordinates/builtin_frames/__init__.py:29: in <module>
    from .fk5 import FK5
/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/astropy/coordinates/builtin_frames/fk5.py:11: in <module>
    from .utils import EQUINOX_J2000
/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/astropy/coordinates/builtin_frames/utils.py:16: in <module>
    from astropy.utils import iers
/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/astropy/utils/iers/__init__.py:2: in <module>
    from .iers import *
/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/astropy/utils/iers/iers.py:23: in <module>
    from astropy.table import QTable, MaskedColumn
/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/astropy/table/__init__.py:71: in <module>
    import astropy.io.misc.asdf.connect
/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/astropy/io/misc/asdf/__init__.py:5: in <module>
    warnings.warn(
E   astropy.utils.exceptions.AstropyDeprecationWarning: ASDF functionality for astropy is being moved out of the astropy package to the new asdf-astropy package. Please use this package instead. astropy.io.misc.asdf is deprecated since astropy 5.1 and will be removed in a future release.
ejeschke commented 2 years ago

@pllim, I think I saw a note about this go by in the astropy-dev mailing list. Is it straightforward to fix? Can we make astropy-asdf an optional package?

pllim commented 2 years ago

It's a known upstream issue. A fix will go in tomorrow in astropy one way or another. Thanks for your patience!

xref:

pllim commented 2 years ago

Should be fixed in astropy dev now. There is no action required here. Next run should pass.