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 <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane
2025-11-28 17:40:20 +00:00
parent a7e2f31ecc
commit 841d95b095
2 changed files with 2 additions and 14 deletions

View File

@@ -158,16 +158,7 @@ def get_plugin_modules(group):
for ep in mgr: for ep in mgr:
LOG.debug('Found plugin %s', ep.name) 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 module_name = ep.entry_point.module
except AttributeError:
module_name = ep.entry_point.value
try: try:
module = importlib.import_module(module_name) module = importlib.import_module(module_name)

View File

@@ -74,10 +74,7 @@ class OpenStackShell(shell.OpenStackShell):
self._auth_type = 'password' self._auth_type = 'password'
def _load_plugins(self): def _load_plugins(self):
"""Load plugins via stevedore """Load plugins via stevedore."""
osc-lib has no opinion on what plugins should be loaded
"""
# Loop through extensions to get API versions # Loop through extensions to get API versions
for mod in clientmanager.PLUGIN_MODULES: for mod in clientmanager.PLUGIN_MODULES:
default_version = getattr(mod, 'DEFAULT_API_VERSION', None) default_version = getattr(mod, 'DEFAULT_API_VERSION', None)