From 21d59a95331a9f527b0cfcc9d4fc33434be0a598 Mon Sep 17 00:00:00 2001 From: Robert Kruszewski Date: Mon, 30 Oct 2023 18:01:32 +0000 Subject: [PATCH] Use importlib instead of pkg_resources --- pydust/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pydust/config.py b/pydust/config.py index 1854983c..4e3151fc 100644 --- a/pydust/config.py +++ b/pydust/config.py @@ -13,9 +13,9 @@ """ import functools +import importlib.metadata from pathlib import Path -import pkg_resources import tomllib from pydantic import BaseModel, Field, model_validator @@ -75,7 +75,7 @@ def load() -> ToolPydust: # Since Poetry doesn't support locking the build-system.requires dependencies, # we perform a check here to prevent the versions from diverging. - pydust_version = pkg_resources.get_distribution("ziggy-pydust").version + pydust_version = importlib.metadata.version("ziggy-pydust") # Skip 0.1.0 as it's the development version when installed locally. if pydust_version != "0.1.0":