From a88e61ce3cd33e64c54dab9e983404564ed4edbb Mon Sep 17 00:00:00 2001 From: Justin Date: Thu, 25 Apr 2024 16:27:46 -0500 Subject: [PATCH] Migrate to importlib entrypoints instead of using pkg_resources --- .coverage | Bin 53248 -> 53248 bytes clicz/__init__.py | 8 +++----- pyproject.toml | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.coverage b/.coverage index 7dcb7b5f12657f2a77e56f74478e801ec1dd086f..b1e70b63e017a6af787512b55b89f672865ea0cf 100644 GIT binary patch delta 146 zcmZozz}&Eac|sDC{mqRjGxeEG^b9r`unDl7W#B)%Sy13GzqBDEGef3+Mt*LpepYF5 zNoJnDOMY@`Zfagh@#Gi&axCW<_|E}V9^scVWX|Nou5j~%NYj#Ge9MW_yvp@SvWZ}_WbOR a7F(ZCuGld7ZoeEGXTzS!%q)v0H~;{G-7NJ0 diff --git a/clicz/__init__.py b/clicz/__init__.py index cb5d155..aa8dbbd 100644 --- a/clicz/__init__.py +++ b/clicz/__init__.py @@ -3,8 +3,8 @@ import functools import inspect import sys +from importlib.metadata import entry_points -import pkg_resources import yaml COLORS = { @@ -311,10 +311,8 @@ def get_invocation_args(parsed_args): method.get_invocation_args = get_invocation_args - def load_plugins( - self, - ): - plugins = pkg_resources.iter_entry_points(self.cli_module) + def load_plugins(self): + plugins = entry_points(group=self.cli_module) for entry_point in plugins: controller_module = entry_point.load() controller = getattr(controller_module, "Controller") diff --git a/pyproject.toml b/pyproject.toml index ad7b19c..481b418 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "clicz" -version = "0.0.2" +version = "0.0.3" description = "" authors = ["Mo Balaa "] readme = "README.md"