From 9d7cb9659d7f338e5c0e2fd7daf29058b4cfac1c Mon Sep 17 00:00:00 2001 From: Abhinav Singh Date: Thu, 11 Apr 2024 07:52:29 +0530 Subject: [PATCH] Use `importlib.metadata` instead of `pkg_resources` --- proxy/common/_version.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/proxy/common/_version.py b/proxy/common/_version.py index 2d4fce9a28..94ae3e5090 100644 --- a/proxy/common/_version.py +++ b/proxy/common/_version.py @@ -18,8 +18,9 @@ from ._scm_version import version as __version__ # noqa: WPS433, WPS436 from ._scm_version import version_tuple as _ver_tup # noqa: WPS433, WPS436 except ImportError: # pragma: no cover - from pkg_resources import get_distribution as _get_dist # noqa: WPS433 - __version__ = _get_dist('proxy.py').version # noqa: WPS440 + from importlib.metadata import version as _get_dist # noqa: WPS433 + + __version__ = _get_dist("proxy.py") # noqa: WPS440 def _to_int_or_str(inp: str) -> Union[int, str]: # pragma: no cover