Skip to content

Commit 2120834

Browse files
committed
MAINT: passing on self._session to pyvo
1 parent 2455808 commit 2120834

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

astroquery/alma/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
from ..exceptions import LoginError
3131
from ..utils import commons
3232
from ..utils.process_asyncs import async_to_sync
33-
from ..query import BaseQuery, QueryWithLogin
33+
from ..query import BaseQuery, QueryWithLogin, BaseVOQuery
3434
from .tapsql import (_gen_pos_sql, _gen_str_sql, _gen_numeric_sql,
3535
_gen_band_list_sql, _gen_datetime_sql, _gen_pol_sql, _gen_pub_sql,
3636
_gen_science_sql, _gen_spec_res_sql, ALMA_DATE_FORMAT)
@@ -212,7 +212,7 @@ def _gen_sql(payload):
212212
return sql + where
213213

214214

215-
class AlmaAuth(BaseQuery):
215+
class AlmaAuth(BaseVOQuery, BaseQuery):
216216
"""Authentication session information for passing credentials to an OIDC instance
217217
218218
Assumes an OIDC system like Keycloak with a preconfigured client app called "oidc" to validate against.
@@ -366,7 +366,7 @@ def sia_url(self):
366366
@property
367367
def tap(self):
368368
if not self._tap:
369-
self._tap = pyvo.dal.tap.TAPService(baseurl=self.tap_url)
369+
self._tap = pyvo.dal.tap.TAPService(baseurl=self.tap_url, session=self._session)
370370
return self._tap
371371

372372
@property

astroquery/cadc/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
from ..utils.class_or_instance import class_or_instance
1919
from ..utils import async_to_sync, commons
20-
from ..query import BaseQuery
20+
from ..query import BaseQuery, BaseVOQuery
2121
from bs4 import BeautifulSoup
2222
from astropy import units as u
2323
from astropy.coordinates import Angle
@@ -37,7 +37,7 @@
3737

3838

3939
@async_to_sync
40-
class CadcClass(BaseQuery):
40+
class CadcClass(BaseVOQuery, BaseQuery):
4141
"""
4242
Class for accessing CADC data. Typical usage:
4343

astroquery/ipac/irsa/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from astropy.utils.decorators import deprecated_renamed_argument
1414
from pyvo.dal import TAPService
1515
from astroquery import log
16-
from astroquery.query import BaseQuery
16+
from astroquery.query import BaseVOQuery
1717
from astroquery.utils.commons import parse_coordinates
1818
from astroquery.ipac.irsa import conf
1919
from astroquery.exceptions import InvalidQueryError
@@ -22,7 +22,7 @@
2222
__all__ = ['Irsa', 'IrsaClass']
2323

2424

25-
class IrsaClass(BaseQuery):
25+
class IrsaClass(BaseVOQuery):
2626

2727
def __init__(self):
2828
super().__init__()
@@ -32,7 +32,7 @@ def __init__(self):
3232
@property
3333
def tap(self):
3434
if not self._tap:
35-
self._tap = TAPService(baseurl=self.tap_url)
35+
self._tap = TAPService(baseurl=self.tap_url, session=self._session)
3636
return self._tap
3737

3838
def query_tap(self, query, *, maxrec=None):

astroquery/ipac/nexsci/nasa_exoplanet_archive/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
# Import astroquery utilities
2323
from astroquery.exceptions import InputWarning, InvalidQueryError, NoResultsWarning, RemoteServiceError
24-
from astroquery.query import BaseQuery
24+
from astroquery.query import BaseQuery, BaseVOQuery
2525
from astroquery.utils import async_to_sync, commons
2626
from astroquery.utils.class_or_instance import class_or_instance
2727
from astroquery.ipac.nexsci.nasa_exoplanet_archive import conf
@@ -129,7 +129,7 @@ class InvalidTableError(InvalidQueryError):
129129
# Class decorator, async_to_sync, modifies NasaExoplanetArchiveClass to convert
130130
# all query_x_async methods to query_x methods
131131
@async_to_sync
132-
class NasaExoplanetArchiveClass(BaseQuery):
132+
class NasaExoplanetArchiveClass(BaseVOQuery, BaseQuery):
133133
"""
134134
The interface for querying the NASA Exoplanet Archive TAP and API services
135135
@@ -230,7 +230,7 @@ def query_criteria_async(self, table, get_query_payload=False, cache=None, **cri
230230
cache = self.CACHE
231231

232232
if table in self.TAP_TABLES:
233-
tap = pyvo.dal.tap.TAPService(baseurl=self.URL_TAP)
233+
tap = pyvo.dal.tap.TAPService(baseurl=self.URL_TAP, session=self._session)
234234
# construct query from table and request_payload (including format)
235235
tap_query = self._request_to_sql(request_payload)
236236

0 commit comments

Comments
 (0)