From c0178b7016dbaccedb88421b1f541db4c1d18127 Mon Sep 17 00:00:00 2001 From: Ignacio Heredia Date: Tue, 29 Oct 2024 13:36:48 +0000 Subject: [PATCH] feat: stop using `importlib.metadata` incompatible with 3.6 --- deepaas/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deepaas/__init__.py b/deepaas/__init__.py index 248be9a..88919e9 100644 --- a/deepaas/__init__.py +++ b/deepaas/__init__.py @@ -15,7 +15,7 @@ # under the License. from contextlib import suppress -import importlib.metadata +# import importlib.metadata # does not work with 3.6 from pathlib import Path __version__ = "2.5.2" @@ -32,4 +32,5 @@ def extract_version() -> str: .strip("'\"\n ") ) return f"{version}-dev (at {root_dir})" - return importlib.metadata.version(__package__ or __name__.split(".", maxsplit=1)[0]) + # return importlib.metadata.version(__package__ or __name__.split(".", maxsplit=1)[0]) + return __version__