With Astropy 6.0, two CI tests produce an error:
______ ERROR collecting density_estimation/tests/test_bayesian_blocks.py _______
ImportError while importing test module '/usr/lib/python3/dist-packages/astroML/density_estimation/tests/test_bayesian_blocks.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
/usr/lib/python3/dist-packages/astroML/density_estimation/tests/test_bayesian_blocks.py:4: in <module>
from astropy.tests.helper import catch_warnings
E ImportError: cannot import name 'catch_warnings' from 'astropy.tests.helper' (/usr/lib/python3/dist-packages/astropy/tests/helper.py)
_______ ERROR collecting density_estimation/tests/test_hist_binwidth.py ________
ImportError while importing test module '/usr/lib/python3/dist-packages/astroML/density_estimation/tests/test_hist_binwidth.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
/usr/lib/python3/dist-packages/astroML/density_estimation/tests/test_hist_binwidth.py:4: in <module>
from astropy.tests.helper import catch_warnings
E ImportError: cannot import name 'catch_warnings' from 'astropy.tests.helper' (/usr/lib/python3/dist-packages/astropy/tests/helper.py)
Full test log
Reason is that astropy.tests.helper.catch_warnings was deprecated in Astropy 5.1 and removed in Astropy 6.0:
- Removed deprecated deprecation, warning, and exception handling functionality provided by astropy.tests.helper. [#14670]
With Astropy 6.0, two CI tests produce an error:
Full test log
Reason is that astropy.tests.helper.catch_warnings was deprecated in Astropy 5.1 and removed in Astropy 6.0: