From 17871c5655734b3a8f440d1f2629633411943713 Mon Sep 17 00:00:00 2001 From: Christian Stefanescu Date: Mon, 13 May 2024 13:11:26 +0200 Subject: [PATCH] Replace pkg_resources with importlib --- alephclient/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/alephclient/api.py b/alephclient/api.py index 8cd19b9..a8c93ed 100644 --- a/alephclient/api.py +++ b/alephclient/api.py @@ -1,7 +1,7 @@ +import importlib import json import uuid import logging -import pkg_resources from itertools import count from pathlib import Path from urllib.parse import urlencode, urljoin @@ -17,7 +17,7 @@ log = logging.getLogger(__name__) MIME = "application/octet-stream" -VERSION = pkg_resources.get_distribution("alephclient").version +VERSION = importlib.metadata.version("alephclient") class APIResultSet(object): @@ -342,7 +342,7 @@ def _bulk_chunk( entityset_id: Optional[str] = None, force: bool = False, unsafe: bool = False, - cleaned: bool = False + cleaned: bool = False, ): for attempt in count(1): url = self._make_url(f"collections/{collection_id}/_bulk")