Skip to content

Commit 26ce1d7

Browse files
authored
Merge pull request #3002 from bsipocz/MAINT_pyvo_15
MAINT: dropping pyvo <1.5
2 parents 7da77a3 + 7da10ab commit 26ce1d7

File tree

9 files changed

+17
-42
lines changed

9 files changed

+17
-42
lines changed

CHANGES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Infrastructure, Utility and Other Changes and Additions
4444

4545
- Versions of Python <3.9 are no longer supported. [#2966]
4646

47+
- Versions of PyVO <1.5 are no longer supported. [#3002]
4748

4849
utils.tap
4950
^^^^^^^^^

astroquery/alma/core.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,7 @@
2020
from astropy import units as u
2121
from astropy.time import Time
2222

23-
try:
24-
from pyvo.dal.sia2 import SIA2_PARAMETERS_DESC, SIA2Service
25-
except ImportError:
26-
# Can be removed once min version of pyvo is 1.5
27-
from pyvo.dal.sia2 import SIA_PARAMETERS_DESC as SIA2_PARAMETERS_DESC
28-
from pyvo.dal.sia2 import SIAService as SIA2Service
23+
from pyvo.dal.sia2 import SIA2_PARAMETERS_DESC, SIA2Service
2924

3025
from ..exceptions import LoginError
3126
from ..utils import commons

astroquery/alma/tests/test_alma_remote.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@
1010
from astropy import units as u
1111
import numpy as np
1212
import pytest
13-
try:
14-
# This requires pyvo 1.4
15-
from pyvo.dal.exceptions import DALOverflowWarning
16-
except ImportError:
17-
pass
13+
14+
from pyvo.dal.exceptions import DALOverflowWarning
1815

1916
from astroquery.exceptions import CorruptDataWarning
2017
from .. import Alma
@@ -52,7 +49,6 @@ def alma(request):
5249
@pytest.mark.remote_data
5350
class TestAlma:
5451
def test_public(self, alma):
55-
# This warning was added in pyvo 1.4, but we don't test older versions with remote-data
5652
with pytest.warns(expected_warning=DALOverflowWarning,
5753
match="Partial result set. Potential causes MAXREC, async storage space, etc."):
5854
results = alma.query(payload=None, public=True, maxrec=100)
@@ -88,7 +84,6 @@ def test_freq(self, alma):
8884
def test_bands(self, alma):
8985
payload = {'band_list': ['5', '7']}
9086
# Added maxrec here as downloading and reading the results take too long.
91-
# This warning was added in pyvo 1.4, but we don't test older versions with remote-data
9287
with pytest.warns(expected_warning=DALOverflowWarning,
9388
match="Partial result set. Potential causes MAXREC, async storage space, etc."):
9489
result = alma.query(payload, maxrec=1000)

astroquery/ipac/irsa/core.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@
1414

1515
from pyvo.dal import TAPService
1616

17-
try:
18-
from pyvo.dal.sia2 import SIA2Service, SIA2_PARAMETERS_DESC
19-
except ImportError:
20-
# Can be removed once min version of pyvo is 1.5
21-
from pyvo.dal.sia2 import SIA_PARAMETERS_DESC as SIA2_PARAMETERS_DESC
22-
from pyvo.dal.sia2 import SIAService as SIA2Service
17+
from pyvo.dal.sia2 import SIA2Service, SIA2_PARAMETERS_DESC
2318

2419
from astroquery import log
2520
from astroquery.query import BaseVOQuery

astroquery/ipac/irsa/tests/test_irsa_remote.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@
66
from astropy.coordinates import SkyCoord
77
from astropy.utils.exceptions import AstropyDeprecationWarning
88

9-
try:
10-
# This requires pyvo 1.4
11-
from pyvo.dal.exceptions import DALOverflowWarning
12-
except ImportError:
13-
pass
9+
from pyvo.dal.exceptions import DALOverflowWarning
1410

1511
from astroquery.ipac.irsa import Irsa
1612

astroquery/simbad/tests/test_simbad_remote.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,8 @@
1111
# Maybe we need to expose SimbadVOTableResult to be in the public API?
1212
from astroquery.simbad.core import SimbadVOTableResult
1313
from astroquery.exceptions import BlankResponseWarning
14-
from packaging import version
15-
from pyvo import __version__ as pyvo_version
16-
try:
17-
# This requires pyvo 1.4
18-
from pyvo.dal.exceptions import DALOverflowWarning
19-
except ImportError:
20-
pass
14+
15+
from pyvo.dal.exceptions import DALOverflowWarning
2116

2217

2318
# M42 coordinates
@@ -273,11 +268,9 @@ def test_query_tap(self):
273268
expect = "letters numbers\n------- -------\n a 1\n b 2\n c 3"
274269
assert expect == str(result)
275270
# Test query_tap raised errors
276-
# DALOverflowWarning exists since pyvo 1.4
277-
if version.parse(pyvo_version) > version.parse('1.4'):
278-
with pytest.raises(DALOverflowWarning, match="Partial result set *"):
279-
truncated_result = Simbad.query_tap("SELECT * from basic", maxrec=2)
280-
assert len(truncated_result) == 2
271+
with pytest.raises(DALOverflowWarning, match="Partial result set *"):
272+
truncated_result = Simbad.query_tap("SELECT * from basic", maxrec=2)
273+
assert len(truncated_result) == 2
281274
with pytest.raises(ValueError, match="The maximum number of records cannot exceed 2000000."):
282275
Simbad.query_tap("select top 5 * from basic", maxrec=10e10)
283276
with pytest.raises(ValueError, match="Query string contains an odd number of single quotes.*"):

docs/index.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ building the documentation, in editable mode:
9595
Requirements
9696
------------
9797

98-
Astroquery works with Python 3.7 or later.
98+
Astroquery works with Python 3.9 or later.
9999

100100
The following packages are required for astroquery installation & use:
101101

102-
* `numpy <http://www.numpy.org>`_ >= 1.18
103-
* `astropy <http://www.astropy.org>`__ (>=4.2.1)
104-
* `pyVO`_ (>=1.1)
102+
* `numpy <http://www.numpy.org>`_ >= 1.20
103+
* `astropy <http://www.astropy.org>`__ (>=5.0)
104+
* `pyVO`_ (>=1.5)
105105
* `requests <https://requests.readthedocs.io/en/latest/>`_
106106
* `keyring <https://pypi.python.org/pypi/keyring>`_
107107
* `Beautiful Soup <https://www.crummy.com/software/BeautifulSoup/>`_

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ install_requires=
137137
beautifulsoup4>=4.8
138138
html5lib>=0.999
139139
keyring>=15.0
140-
pyvo>=1.1
140+
pyvo>=1.5
141141
tests_require =
142142
pytest-doctestplus>=0.13
143143
pytest-astropy

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ deps =
3737
oldestdeps: astropy==5.0.0
3838
oldestdeps: numpy==1.20
3939
oldestdeps: matplotlib==3.4.*
40-
oldestdeps: pyvo==1.1
40+
oldestdeps: pyvo==1.5
4141
oldestdeps: pytest-doctestplus==0.13
4242
oldestdeps: requests==2.25
4343
oldestdeps: keyring==15.0

0 commit comments

Comments
 (0)