Skip to content

Commit 62aa597

Browse files
committed
MNT: cleanup deprecations
1 parent 5f6d94b commit 62aa597

File tree

1 file changed

+6
-71
lines changed

1 file changed

+6
-71
lines changed

astroquery/cadc/core.py

Lines changed: 6 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,14 @@ class CadcClass(BaseQuery):
7070
CADCLOGIN_SERVICE_URI = conf.CADCLOGIN_SERVICE_URI
7171
TIMEOUT = conf.TIMEOUT
7272

73-
def __init__(self, url=None, tap_plus_handler=None, verbose=None,
74-
auth_session=None):
73+
def __init__(self, url=None, auth_session=None):
7574
"""
7675
Initialize Cadc object
7776
7877
Parameters
7978
----------
8079
url : str, optional, default 'None;
8180
a url to use instead of the default
82-
tap_plus_handler : deprecated
83-
verbose : deprecated
8481
auth_session: `requests.Session` or `pyvo.auth.authsession.AuthSession`
8582
A existing authenticated session containing the appropriate
8683
credentials to be used by the client to communicate with the
@@ -90,10 +87,6 @@ def __init__(self, url=None, tap_plus_handler=None, verbose=None,
9087
-------
9188
Cadc object
9289
"""
93-
if tap_plus_handler:
94-
raise AttributeError('tap handler no longer supported')
95-
if verbose is not None:
96-
warnings.warn('verbose deprecated since version 0.4.0')
9790

9891
super(CadcClass, self).__init__()
9992
self.baseurl = url
@@ -202,19 +195,12 @@ def login(self, user=None, password=None, certificate_file=None):
202195
self.cadctap._session.cookies.set(
203196
CADC_COOKIE_PREFIX, cookie)
204197

205-
def logout(self, verbose=None):
198+
def logout(self):
206199
"""
207200
Logout. Anonymous access with all the subsequent use of the
208201
object. Note that the original session is not affected (in case
209202
it was passed when the object was first instantiated)
210-
211-
Parameters
212-
----------
213-
verbose : deprecated
214-
215203
"""
216-
if verbose is not None:
217-
warnings.warn('verbose deprecated since 0.4.0')
218204

219205
if isinstance(self._auth_session, pyvo.auth.AuthSession):
220206
# Remove the existing credentials (if any)
@@ -553,44 +539,38 @@ def get_data_urls(self, query_result, include_auxiliaries=False):
553539
result.append(service_def.access_url)
554540
return result
555541

556-
def get_tables(self, only_names=False, verbose=None):
542+
def get_tables(self, only_names=False):
557543
"""
558544
Gets all public tables
559545
560546
Parameters
561547
----------
562548
only_names : bool, optional, default False
563549
True to load table names only
564-
verbose : deprecated
565550
566551
Returns
567552
-------
568553
A list of table objects
569554
"""
570-
if verbose is not None:
571-
warnings.warn('verbose deprecated since 0.4.0')
572555
table_set = self.cadctap.tables
573556
if only_names:
574557
return list(table_set.keys())
575558
else:
576559
return list(table_set.values())
577560

578-
def get_table(self, table, verbose=None):
561+
def get_table(self, table):
579562
"""
580563
Gets the specified table
581564
582565
Parameters
583566
----------
584567
table : str, mandatory
585568
full qualified table name (i.e. schema name + table name)
586-
verbose : deprecated
587569
588570
Returns
589571
-------
590572
A table object
591573
"""
592-
if verbose is not None:
593-
warnings.warn('verbose deprecated since 0.4.0')
594574
tables = self.get_tables()
595575
for t in tables:
596576
if table == t.name:
@@ -675,67 +655,25 @@ def create_async(self, query, maxrec=None, uploads=None):
675655
return self.cadctap.submit_job(query, language='ADQL',
676656
uploads=uploads)
677657

678-
@deprecated('0.4.0', 'Use exec_sync or create_async instead')
679-
def run_query(self, query, operation, output_file=None,
680-
output_format="votable", verbose=None,
681-
background=False, upload_resource=None,
682-
upload_table_name=None):
683-
"""
684-
Runs a query
685-
686-
Parameters
687-
----------
688-
query : str, mandatory
689-
query to be executed
690-
operation : str, mandatory,
691-
'sync' or 'async' to run a synchronous or asynchronous job
692-
output_file : str, optional, default None
693-
file name where the results are saved if dumpToFile is True.
694-
If this parameter is not provided, the jobid is used instead
695-
output_format : str, optional, default 'votable'
696-
results format, 'csv', 'tsv' and 'votable'
697-
verbose : deprecated
698-
save_to_file : bool, optional, default 'False'
699-
if True, the results are saved in a file instead of using memory
700-
background : bool, optional, default 'False'
701-
when the job is executed in asynchronous mode,
702-
this flag specifies whether the execution will wait until results
703-
are available
704-
upload_resource : str, optional, default None
705-
resource to be uploaded to UPLOAD_SCHEMA
706-
upload_table_name : str, required if uploadResource is provided,
707-
default None
708-
resource temporary table name associated to the uploaded resource
709-
710-
Returns
711-
-------
712-
A Job object
713-
"""
714-
raise NotImplementedError('No longer supported. '
715-
'Use exec_sync or create_async instead.')
716-
717-
def load_async_job(self, jobid, verbose=None):
658+
def load_async_job(self, jobid):
718659
"""
719660
Loads an asynchronous job
720661
721662
Parameters
722663
----------
723664
jobid : str, mandatory
724665
job identifier
725-
verbose : deprecated
726666
727667
Returns
728668
-------
729669
A Job object
730670
"""
731-
if verbose is not None:
732-
warnings.warn('verbose deprecated since 0.4.0')
733671

734672
return pyvo.dal.AsyncTAPJob('{}/async/{}'.format(
735673
self.cadctap.baseurl, jobid), session=self._auth_session)
736674

737675
def list_async_jobs(self, phases=None, after=None, last=None,
738-
short_description=True, verbose=None):
676+
short_description=True):
739677
"""
740678
Returns all the asynchronous jobs
741679
@@ -752,14 +690,11 @@ def list_async_jobs(self, phases=None, after=None, last=None,
752690
corresponding to the TAP ShortJobDescription object (job ID, phase,
753691
run ID, owner ID and creation ID) whereas if False, a separate GET
754692
call to each job is performed for the complete job description
755-
verbose : deprecated
756693
757694
Returns
758695
-------
759696
A list of Job objects
760697
"""
761-
if verbose is not None:
762-
warnings.warn('verbose deprecated since 0.4.0')
763698

764699
return self.cadctap.get_job_list(phases=phases, after=after, last=last,
765700
short_description=short_description)

0 commit comments

Comments
 (0)