From 841d95b095105a934a4860a1a6e4b96d5b0555da Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Fri, 28 Nov 2025 17:40:20 +0000 Subject: [PATCH] common: Remove references to pkg_resources Even though the comment here attributed this to stevedore, it was in fact the use of pkg_resources that changed things. Change-Id: I35377dd7d773024aa6423b72b1412e11b1b6f2e4 Signed-off-by: Stephen Finucane --- openstackclient/common/clientmanager.py | 11 +---------- openstackclient/shell.py | 5 +---- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/openstackclient/common/clientmanager.py b/openstackclient/common/clientmanager.py index 94c25e3f9c..2213f1e46a 100644 --- a/openstackclient/common/clientmanager.py +++ b/openstackclient/common/clientmanager.py @@ -158,16 +158,7 @@ def get_plugin_modules(group): for ep in mgr: LOG.debug('Found plugin %s', ep.name) - # Different versions of stevedore use different - # implementations of EntryPoint from other libraries, which - # are not API-compatible. - try: - module_name = ep.entry_point.module_name - except AttributeError: - try: - module_name = ep.entry_point.module - except AttributeError: - module_name = ep.entry_point.value + module_name = ep.entry_point.module try: module = importlib.import_module(module_name) diff --git a/openstackclient/shell.py b/openstackclient/shell.py index dfc559a04c..a494d74389 100644 --- a/openstackclient/shell.py +++ b/openstackclient/shell.py @@ -74,10 +74,7 @@ class OpenStackShell(shell.OpenStackShell): self._auth_type = 'password' def _load_plugins(self): - """Load plugins via stevedore - - osc-lib has no opinion on what plugins should be loaded - """ + """Load plugins via stevedore.""" # Loop through extensions to get API versions for mod in clientmanager.PLUGIN_MODULES: default_version = getattr(mod, 'DEFAULT_API_VERSION', None)