diff --git a/cdsapi/api.py b/cdsapi/api.py index d136335..051186d 100644 --- a/cdsapi/api.py +++ b/cdsapi/api.py @@ -22,7 +22,6 @@ except ImportError: from urlparse import urljoin -from datapi.legacy_api_client import LegacyApiClient from tqdm import tqdm @@ -283,7 +282,9 @@ def __new__(cls, url=None, key=None, *args, **kwargs): if ":" in token: return super().__new__(cls) - return super().__new__(LegacyApiClient) + import datapi.legacy_api_client + + return super().__new__(datapi.legacy_api_client.LegacyApiClient) def __init__( self, diff --git a/setup.py b/setup.py index 6f347a3..88c8d10 100644 --- a/setup.py +++ b/setup.py @@ -46,7 +46,7 @@ def read(fname): include_package_data=True, python_requires=">=3.8", install_requires=[ - # "datapi", + # "datapi", "requests>=2.5.0", "tqdm", ],