diff --git a/lightbus/commands/version.py b/lightbus/commands/version.py index e26647a0..61520f28 100644 --- a/lightbus/commands/version.py +++ b/lightbus/commands/version.py @@ -4,9 +4,13 @@ from pathlib import Path if sys.version_info < (3, 10): - from importlib_metadata import version as importlib_version + from importlib.metadata import entry_points as _entry_points + + def entry_points(group): + return _entry_points()[group] + else: - from importlib.metadata import version as importlib_version + from importlib.metadata import entry_points logger = logging.getLogger(__name__) diff --git a/lightbus/utilities/importing.py b/lightbus/utilities/importing.py index c7dee756..f0fa7549 100644 --- a/lightbus/utilities/importing.py +++ b/lightbus/utilities/importing.py @@ -4,7 +4,11 @@ from typing import Sequence, Tuple, Callable if sys.version_info < (3, 10): - from importlib_metadata import entry_points + from importlib.metadata import entry_points as _entry_points + + def entry_points(group): + return _entry_points()[group] + else: from importlib.metadata import entry_points diff --git a/pyproject.toml b/pyproject.toml index 29860419..63a9d0ac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -94,5 +94,5 @@ async-timeout = "^4.0.3" debug = "lightbus:DebugSchemaTransport" [build-system] - requires = ["poetry>=0.12"] - build-backend = "poetry.masonry.api" + requires = ["poetry>=1.0.0"] + build-backend = "poetry.core.masonry.api"