@@ -70,17 +70,14 @@ class CadcClass(BaseQuery):
70
70
CADCLOGIN_SERVICE_URI = conf .CADCLOGIN_SERVICE_URI
71
71
TIMEOUT = conf .TIMEOUT
72
72
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 ):
75
74
"""
76
75
Initialize Cadc object
77
76
78
77
Parameters
79
78
----------
80
79
url : str, optional, default 'None;
81
80
a url to use instead of the default
82
- tap_plus_handler : deprecated
83
- verbose : deprecated
84
81
auth_session: `requests.Session` or `pyvo.auth.authsession.AuthSession`
85
82
A existing authenticated session containing the appropriate
86
83
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,
90
87
-------
91
88
Cadc object
92
89
"""
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' )
97
90
98
91
super (CadcClass , self ).__init__ ()
99
92
self .baseurl = url
@@ -202,19 +195,12 @@ def login(self, user=None, password=None, certificate_file=None):
202
195
self .cadctap ._session .cookies .set (
203
196
CADC_COOKIE_PREFIX , cookie )
204
197
205
- def logout (self , verbose = None ):
198
+ def logout (self ):
206
199
"""
207
200
Logout. Anonymous access with all the subsequent use of the
208
201
object. Note that the original session is not affected (in case
209
202
it was passed when the object was first instantiated)
210
-
211
- Parameters
212
- ----------
213
- verbose : deprecated
214
-
215
203
"""
216
- if verbose is not None :
217
- warnings .warn ('verbose deprecated since 0.4.0' )
218
204
219
205
if isinstance (self ._auth_session , pyvo .auth .AuthSession ):
220
206
# Remove the existing credentials (if any)
@@ -553,44 +539,38 @@ def get_data_urls(self, query_result, include_auxiliaries=False):
553
539
result .append (service_def .access_url )
554
540
return result
555
541
556
- def get_tables (self , only_names = False , verbose = None ):
542
+ def get_tables (self , only_names = False ):
557
543
"""
558
544
Gets all public tables
559
545
560
546
Parameters
561
547
----------
562
548
only_names : bool, optional, default False
563
549
True to load table names only
564
- verbose : deprecated
565
550
566
551
Returns
567
552
-------
568
553
A list of table objects
569
554
"""
570
- if verbose is not None :
571
- warnings .warn ('verbose deprecated since 0.4.0' )
572
555
table_set = self .cadctap .tables
573
556
if only_names :
574
557
return list (table_set .keys ())
575
558
else :
576
559
return list (table_set .values ())
577
560
578
- def get_table (self , table , verbose = None ):
561
+ def get_table (self , table ):
579
562
"""
580
563
Gets the specified table
581
564
582
565
Parameters
583
566
----------
584
567
table : str, mandatory
585
568
full qualified table name (i.e. schema name + table name)
586
- verbose : deprecated
587
569
588
570
Returns
589
571
-------
590
572
A table object
591
573
"""
592
- if verbose is not None :
593
- warnings .warn ('verbose deprecated since 0.4.0' )
594
574
tables = self .get_tables ()
595
575
for t in tables :
596
576
if table == t .name :
@@ -675,67 +655,25 @@ def create_async(self, query, maxrec=None, uploads=None):
675
655
return self .cadctap .submit_job (query , language = 'ADQL' ,
676
656
uploads = uploads )
677
657
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 ):
718
659
"""
719
660
Loads an asynchronous job
720
661
721
662
Parameters
722
663
----------
723
664
jobid : str, mandatory
724
665
job identifier
725
- verbose : deprecated
726
666
727
667
Returns
728
668
-------
729
669
A Job object
730
670
"""
731
- if verbose is not None :
732
- warnings .warn ('verbose deprecated since 0.4.0' )
733
671
734
672
return pyvo .dal .AsyncTAPJob ('{}/async/{}' .format (
735
673
self .cadctap .baseurl , jobid ), session = self ._auth_session )
736
674
737
675
def list_async_jobs (self , phases = None , after = None , last = None ,
738
- short_description = True , verbose = None ):
676
+ short_description = True ):
739
677
"""
740
678
Returns all the asynchronous jobs
741
679
@@ -752,14 +690,11 @@ def list_async_jobs(self, phases=None, after=None, last=None,
752
690
corresponding to the TAP ShortJobDescription object (job ID, phase,
753
691
run ID, owner ID and creation ID) whereas if False, a separate GET
754
692
call to each job is performed for the complete job description
755
- verbose : deprecated
756
693
757
694
Returns
758
695
-------
759
696
A list of Job objects
760
697
"""
761
- if verbose is not None :
762
- warnings .warn ('verbose deprecated since 0.4.0' )
763
698
764
699
return self .cadctap .get_job_list (phases = phases , after = after , last = last ,
765
700
short_description = short_description )
0 commit comments