Skip to content

Commit

Permalink
Don't use deprecated pkg_resources
Browse files Browse the repository at this point in the history
  • Loading branch information
mmwinther committed Jan 10, 2024
1 parent 09c80ba commit a819b18
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions datadoc/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""General utilities."""

import datetime
import importlib

from datadoc_model import model
from pydantic import AnyUrl
Expand Down Expand Up @@ -61,6 +62,4 @@ def get_timestamp_now() -> datetime:

def get_app_version() -> str:
"""Get the version of the Datadoc package."""
import pkg_resources

return pkg_resources.get_distribution("ssb-datadoc").version
return importlib.metadata.distribution("ssb-datadoc").version

0 comments on commit a819b18

Please sign in to comment.