|
12 | 12 | from bs4 import BeautifulSoup |
13 | 13 | import pyvo |
14 | 14 |
|
15 | | -from six.moves.urllib_parse import urljoin |
16 | | -import six |
| 15 | +from urllib.parse import urljoin |
17 | 16 | from astropy.table import Table, Column, vstack |
18 | 17 | from astroquery import log |
19 | 18 | from astropy.utils import deprecated |
@@ -567,7 +566,7 @@ def get_data_info(self, uids, expand_tarfiles=False, |
567 | 566 | """ |
568 | 567 | if uids is None: |
569 | 568 | raise AttributeError('UIDs required') |
570 | | - if isinstance(uids, six.string_types + (np.bytes_,)): |
| 569 | + if isinstance(uids, (str, bytes)): |
571 | 570 | uids = [uids] |
572 | 571 | if not isinstance(uids, (list, tuple, np.ndarray)): |
573 | 572 | raise TypeError("Datasets must be given as a list of strings.") |
@@ -811,7 +810,7 @@ def retrieve_data_from_uid(self, uids, cache=True): |
811 | 810 | downloaded_files : list |
812 | 811 | A list of the downloaded file paths |
813 | 812 | """ |
814 | | - if isinstance(uids, six.string_types + (np.bytes_,)): |
| 813 | + if isinstance(uids, (str, bytes)): |
815 | 814 | uids = [uids] |
816 | 815 | if not isinstance(uids, (list, tuple, np.ndarray)): |
817 | 816 | raise TypeError("Datasets must be given as a list of strings.") |
@@ -1073,7 +1072,7 @@ def download_and_extract_files(self, urls, delete=True, regex=r'.*\.fits$', |
1073 | 1072 | data from an ASDM tarball |
1074 | 1073 | """ |
1075 | 1074 |
|
1076 | | - if isinstance(urls, six.string_types): |
| 1075 | + if isinstance(urls, str): |
1077 | 1076 | urls = [urls] |
1078 | 1077 | if not isinstance(urls, (list, tuple, np.ndarray)): |
1079 | 1078 | raise TypeError("Datasets must be given as a list of strings.") |
@@ -1174,7 +1173,6 @@ def _json_summary_to_table(self, data, base_url): |
1174 | 1173 | March 2020 - should be removed along with stage_data_prefeb2020 |
1175 | 1174 | """ |
1176 | 1175 | from ..utils import url_helpers |
1177 | | - from six import iteritems |
1178 | 1176 | columns = {'mous_uid': [], 'URL': [], 'size': []} |
1179 | 1177 | for entry in data['node_data']: |
1180 | 1178 | # de_type can be useful (e.g., MOUS), but it is not necessarily |
@@ -1212,7 +1210,7 @@ def _json_summary_to_table(self, data, base_url): |
1212 | 1210 |
|
1213 | 1211 | columns['size'] = u.Quantity(columns['size'], u.Gbyte) |
1214 | 1212 |
|
1215 | | - tbl = Table([Column(name=k, data=v) for k, v in iteritems(columns)]) |
| 1213 | + tbl = Table([Column(name=k, data=v) for k, v in columns.items()]) |
1216 | 1214 | return tbl |
1217 | 1215 |
|
1218 | 1216 | def get_project_metadata(self, projectid, cache=True): |
|
0 commit comments