Skip to content

Commit 6c585d7

Browse files
authored
Merge pull request #2171 from bsipocz/nasa_epa_astropy4.0_compatibility
Fixing compatibility of nasa_exoplanet_archive with astropy <4.1
2 parents b4321f8 + 70ee559 commit 6c585d7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

astroquery/ipac/nexsci/nasa_exoplanet_archive/core.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,10 @@ def get_tap_tables():
104104
"""Tables accessed by API are gradually migrating to TAP service. Generate current list of tables in TAP."""
105105
tap = pyvo.dal.tap.TAPService(baseurl=conf.url_tap)
106106
response = tap.search(query="select * from TAP_SCHEMA.tables", language="ADQL")
107-
tables = [table for table in response["table_name"].data if "TAP_SCHEMA." not in table]
107+
if not commons.ASTROPY_LT_4_1:
108+
tables = [table for table in response["table_name"].data if "TAP_SCHEMA." not in table]
109+
else:
110+
tables = [table.decode() for table in response["table_name"].data if b"TAP_SCHEMA." not in table]
108111
return tables
109112

110113

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ filterwarnings =
5656
# Upstream, remove when fixed, PRs have been opened
5757
ignore::DeprecationWarning:pyvo
5858
ignore::DeprecationWarning:regions
59+
# This should be cleared once we requre astropy>=4.1
60+
ignore:tostring\(\) is deprecated. Use tobytes:DeprecationWarning:astropy
5961
markers =
6062
bigdata: marks tests that are expected to trigger a large download (deselect with '-m "not bigdata"')
6163

0 commit comments

Comments
 (0)