Skip to content

Commit 4e422d8

Browse files
snbiancobsipocz
authored andcommitted
Use deprecated decorator
1 parent 45fe7d2 commit 4e422d8

File tree

2 files changed

+22
-12
lines changed

2 files changed

+22
-12
lines changed

astroquery/mast/core.py

+21-11
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
66
This the base class for MAST queries.
77
"""
8-
import warnings
9-
10-
from astropy.utils.exceptions import AstropyDeprecationWarning
8+
from astropy.utils import deprecated
119
from ..query import QueryWithLogin
1210
from . import utils
1311
from .auth import MastAuth
@@ -84,21 +82,33 @@ def logout(self):
8482
self._auth_obj.logout()
8583
self._authenticated = False
8684

85+
@deprecated(since='v0.4.8',
86+
message=('This function is non-operational and will be removed in a future release.'))
8787
def enable_cloud_dataset(self, provider="AWS", profile=None, verbose=True):
8888
"""
89-
.. deprecated:: 0.4.8
90-
This function is non-operational and has been deprecated.
89+
Enable downloading public files from S3 instead of MAST.
90+
Requires the boto3 library to function.
91+
92+
Parameters
93+
----------
94+
provider : str
95+
Which cloud data provider to use. We may in the future support multiple providers,
96+
though at the moment this argument is ignored.
97+
profile : str
98+
Profile to use to identify yourself to the cloud provider (usually in ~/.aws/config).
99+
verbose : bool
100+
Default True.
101+
Logger to display extra info and warning.
91102
"""
92-
warnings.warn('This function is non-operational and will be removed in a future release.',
93-
AstropyDeprecationWarning)
103+
pass
94104

105+
@deprecated(since='v0.4.8',
106+
message=('This function is non-operational and will be removed in a future release.'))
95107
def disable_cloud_dataset(self):
96108
"""
97-
.. deprecated:: 0.4.8
98-
This function is non-operational and has been deprecated.
109+
Disables downloading public files from S3 instead of MAST.
99110
"""
100-
warnings.warn('This function is non-operational and will be removed in a future release.',
101-
AstropyDeprecationWarning)
111+
pass
102112

103113
def resolve_object(self, objectname):
104114
"""

astroquery/mast/observations.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def enable_cloud_dataset(self, provider="AWS", profile=None, verbose=True):
192192

193193
def disable_cloud_dataset(self):
194194
"""
195-
Disables downloading public files from S3 instead of MAST
195+
Disables downloading public files from S3 instead of MAST.
196196
"""
197197
self._cloud_connection = None
198198

0 commit comments

Comments
 (0)