Skip to content

Commit afddaa8

Browse files
authored
Merge pull request #2793 from bsipocz/maint_cleanup_deprecations
MAINT: deprecation maintanence
2 parents 7ec75e2 + 8ac505e commit afddaa8

File tree

9 files changed

+48
-4
lines changed

9 files changed

+48
-4
lines changed

astroquery/cds/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,19 @@
1616
This research has made use of the MOCServer, a tool developed at CDS, Strasbourg, France aiming at retrieving
1717
MOCs/meta-data from known data-sets. MOC is an IVOA standard described in the following paper :
1818
http://www.ivoa.net/documents/MOC/20140602/REC-MOC-1.0-20140602.pdf
19+
20+
.. deprecated:: 0.4.7
1921
"""
2022

2123
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2224
import warnings
25+
from astropy.utils.exceptions import AstropyDeprecationWarning
26+
2327

2428
warnings.warn("The ``cds`` module has been moved to astroquery.mocserver, "
2529
"and ``CdsClass`` has been renamed to ``MOCServerClass``. "
26-
"Please update your imports.", DeprecationWarning, stacklevel=2)
30+
"Please update your imports.", AstropyDeprecationWarning, stacklevel=2)
31+
2732

2833
from astroquery.mocserver import MOCServer as cds
2934
from astroquery.mocserver import MOCServerClass as CdsClass

astroquery/ibe/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2+
"""
3+
This is the old namespace for querying the NASA/IPAC Infrared Science Archive Image Server (IBE).
4+
Please update your imports and use it from astroquery.ipac.irsa.ibe
5+
6+
.. deprecated:: 0.4.4
7+
"""
28
import warnings
39

410
warnings.warn("the ``ibe`` module has been moved to astroquery.ipac.irsa.ibe, "

astroquery/irsa/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2+
"""
3+
This is the old namespace for querying the NASA/IPAC Infrared Science Archive (IRSA).
4+
Please update your imports and use it from astroquery.ipac.irsa
5+
6+
.. deprecated:: 0.4.4
7+
"""
28
import warnings
39

410
warnings.warn("the ``irsa`` module has been moved to astroquery.ipac.irsa, "

astroquery/irsa_dust/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2+
"""
3+
This is the old namespace for querying the NASA/IPAC Infrared Science Archive Dust Reddening Tool.
4+
Please update your imports and use it from astroquery.ipac.irsa.irsa_dust
25
6+
.. deprecated:: 0.4.4
7+
"""
38

49
import warnings
510

astroquery/mocserver/tests/test_deprecation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import pytest
2+
from astropy.utils.exceptions import AstropyDeprecationWarning
23

34

45
def test_raises_deprecation_warning():
56
with pytest.raises(
6-
DeprecationWarning,
7+
AstropyDeprecationWarning,
78
match="The ``cds`` module has been moved to astroquery.mocserver, "
89
"and ``CdsClass`` has been renamed to ``MOCServerClass``. "
910
"Please update your imports."):

astroquery/nasa_exoplanet_archive/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2+
"""
3+
This is the old namespace for querying the NASA Exolpanet Archive.
4+
Please update your imports and use it from astroquery.ipac.nexsci.nasa_exoplanet_archive.
5+
6+
.. deprecated:: 0.4.4
7+
"""
28
import warnings
39

410
warnings.warn("the ``nasa_exoplanet_archive`` module has been moved to "

astroquery/ned/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2+
"""
3+
This is the old namespace for querying the NASA Extragalactic Database (NED).
4+
Please update your imports and use it from astroquery.ipac.ned
5+
6+
.. deprecated:: 0.4.4
7+
"""
28
import warnings
39

410
warnings.warn("the ``ned`` module has been moved to astroquery.ipac.ned, "

astroquery/sha/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2+
"""
3+
This is the old namespace for querying the Spitzer Heritage Archive (SHA).
4+
Please update your imports and use it from astroquery.ipac.irsa.sha.
5+
6+
.. deprecated:: 0.4.4
7+
"""
28
import warnings
39

10+
411
warnings.warn("the ``sha`` module has been moved to astroquery.ipac.irsa.sha, "
512
"please update your imports.", DeprecationWarning, stacklevel=2)
613

setup.cfg

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,16 @@ filterwarnings =
5858
ignore:Experimental. Fermi-LAT:UserWarning
5959
ignore:Experimental. SHA:UserWarning
6060
ignore:Experimental. OGLE:UserWarning:
61-
# Warnings from deprecated or known-to-be-broken modules
62-
ignore:The legacy NRAO archive this module uses has been retired:UserWarning
61+
# Warnings from deprecated or known-to-be-broken modules. They have to be listed to make test collection work,
62+
# Can be removed once the modules are removed.
6363
ignore:vamdclib could not be imported; the vamdc astroquery module will not work:UserWarning
6464
ignore:the vamdc astroquery module:astropy.utils.exceptions.AstropyDeprecationWarning
6565
# exoplanet_orbit_database
6666
ignore:due to the retirement of its upstream website:astropy.utils.exceptions.AstropyDeprecationWarning
6767
# Leap second update related warning
6868
ignore:leap-second auto-update failed:astropy.utils.exceptions.AstropyWarning
69+
70+
6971
# Should ignore these for astropy<5.0
7072
ignore:getName|currentThread:DeprecationWarning:astropy
7173
markers =

0 commit comments

Comments
 (0)