From 2aea5c9b3224215e246b7508b5f81a7d36cf1abd Mon Sep 17 00:00:00 2001 From: Rabi Mishra Date: Wed, 15 Jul 2020 11:35:08 +0530 Subject: [PATCH] Use correct attribute from entrypoint The type of the entry point objects returned in stevedore has been changed from`pkg_resources.EntryPoint` to `importlib.metadata.EntryPoint`[1] and it does not have module_name attribute. It also bumps requirements/lower-constraints as stevedore==3.1.0 is not backward compatible. [1] https://review.opendev.org/#/c/740515/ Task: 40355 Change-Id: Icd68f6eab73e44406f2ff5073636dcdd111e00ea --- heat/common/pluginutils.py | 2 +- lower-constraints.txt | 2 +- requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/heat/common/pluginutils.py b/heat/common/pluginutils.py index e3c4bdf4e3..c4da0ec066 100644 --- a/heat/common/pluginutils.py +++ b/heat/common/pluginutils.py @@ -20,7 +20,7 @@ LOG = logging.getLogger(__name__) def log_fail_msg(manager, entrypoint, exception): LOG.warning('Encountered exception while loading %(module_name)s: ' '"%(message)s". Not using %(name)s.', - {'module_name': entrypoint.module_name, + {'module_name': entrypoint.module, 'message': getattr(exception, 'message', str(exception)), 'name': entrypoint.name}) diff --git a/lower-constraints.txt b/lower-constraints.txt index d2699c73e1..567c533387 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -139,7 +139,7 @@ SQLAlchemy==1.0.10 sqlparse==0.2.4 statsd==3.2.2 stestr==2.0.0 -stevedore==1.20.0 +stevedore==3.1.0 tempest==17.1.0 Tempita==0.5.2 tenacity==4.4.0 diff --git a/requirements.txt b/requirements.txt index ad414aa173..091e8aa4f8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -61,6 +61,6 @@ tenacity>=4.4.0 # Apache-2.0 Routes>=2.3.1 # MIT SQLAlchemy!=1.1.5,!=1.1.6,!=1.1.7,!=1.1.8,>=1.0.10 # MIT sqlalchemy-migrate>=0.11.0 # Apache-2.0 -stevedore>=1.20.0 # Apache-2.0 +stevedore>=3.1.0 # Apache-2.0 WebOb>=1.7.1 # MIT yaql>=1.1.3 # Apache 2.0 License