diff --git a/docs/conf.py b/docs/conf.py index 440ba99e..fc82e5c1 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 e35595f2..8bb8dba9 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()