Skip to content

Commit

Permalink
feat: stop using importlib.metadata incompatible with 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnacioHeredia authored and alvarolopez committed Nov 11, 2024
1 parent a492900 commit c0178b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions deepaas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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__

0 comments on commit c0178b7

Please sign in to comment.