File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 10
10
from pathlib import Path
11
11
import os
12
12
import sys
13
+ from unittest .mock import Mock , patch , PropertyMock
14
+ import pytest
15
+ import requests
16
+ import warnings
13
17
14
18
from astropy .table import Table
15
19
from astropy .io .fits .hdu .hdulist import HDUList
16
- from astropy .io .votable .tree import VOTableFile , Resource , TableElement , Field
20
+ from astropy .io .votable .tree import VOTableFile , Resource , Field
17
21
from astropy .io .votable import parse
18
22
from astropy .utils .diff import report_diff_values
19
23
from astroquery .utils .commons import parse_coordinates , FileContainer
20
24
from astropy import units as u
21
- import pytest
22
- import requests
23
- import warnings
24
25
25
26
from pyvo .auth import securitymethods
26
27
from astroquery .cadc import Cadc , conf
27
28
import astroquery .cadc .core as cadc_core
28
29
29
- from unittest .mock import Mock , patch , PropertyMock
30
+ try :
31
+ # Workaround astropy deprecation, remove try/except once >=6.0 is required
32
+ from astropy .io .votable .tree import TableElement
33
+ except ImportError :
34
+ from astropy .io .votable .tree import Table as TableElement
30
35
31
36
try :
32
37
# workaround for https://github.com/astropy/astroquery/issues/2523 to support bs4<4.11
You can’t perform that action at this time.
0 commit comments