Skip to content

Commit

Permalink
restore optional import
Browse files Browse the repository at this point in the history
  • Loading branch information
malmans2 committed Nov 14, 2024
1 parent b84f95e commit b2e1eb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cdsapi/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
except ImportError:
from urlparse import urljoin

from datapi.legacy_api_client import LegacyApiClient
from tqdm import tqdm


Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def read(fname):
include_package_data=True,
python_requires=">=3.8",
install_requires=[
# "datapi",
# "datapi",
"requests>=2.5.0",
"tqdm",
],
Expand Down

0 comments on commit b2e1eb0

Please sign in to comment.