From 5d4cbe9b6c00320361bb9100eea5062d558491d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marwan=20Rabb=C3=A2a?= Date: Tue, 7 Apr 2026 21:24:47 +0200 Subject: [PATCH] remove pkg_resources --- docs/conf.py | 4 ++-- nameko/cli/main.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 440ba99ed..fc82e5c1a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,7 +13,7 @@ # serve to show the default. import sphinx_nameko_theme -import pkg_resources +import importlib # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -58,7 +58,7 @@ # built documents. # # The short X.Y version. -version = pkg_resources.get_distribution('nameko').version +version = importlib.metadata.version('nameko') # The full version, including alpha/beta/rc tags. release = version diff --git a/nameko/cli/main.py b/nameko/cli/main.py index e35595f2f..8bb8dba9c 100644 --- a/nameko/cli/main.py +++ b/nameko/cli/main.py @@ -6,7 +6,7 @@ from functools import partial import yaml -from pkg_resources import get_distribution +import importlib from nameko.exceptions import CommandError, ConfigurationError @@ -79,7 +79,7 @@ def setup_parser(): '-v', '--version', action='version', - version=get_distribution('nameko').version + version=importlib.metadata.version('nameko') ) subparsers = parser.add_subparsers()