PBR

importlib_metadata is conflicting with pbr

Bug #1972975 reported by Jochman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PBR
In Progress
Undecided
Unassigned

Bug Description

importlib_metadata pack is removed from pbr in the last release.

but if it is available to import, pbr is still using it. The problem occurs when an old version (like importlib_metadata==0.23) is presented and it is not compatible with the implementation in PBR.

Revision history for this message
Stephen Finucane (stephenfinucane) wrote :

> importlib_metadata pack is removed from pbr in the last release.

I don't understand this. We didn't remove anything from pbr.

> but if it is available to import, pbr is still using it. The problem occurs when an old version (like importlib_metadata==0.23) is presented and it is not compatible with the implementation in PBR.

Could you give us an example of the kind of errors you are seeing?

Changed in pbr:
status: New → Incomplete
Revision history for this message
Jochman (jochman) wrote :
Download full text (3.7 KiB)

In the latest releases you've added the check for if importlib_metadata is installed.

Error I got:

Traceback (most recent call last):
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/stevedore/_cache.py", line 159, in _get_data_for_path
    with open(filename, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/root/.cache/python-entrypoints/91d14e59ff7d623967ce1b6a6e589176c3086b83b4325bd9e872bf8067e0d14c'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/runpy.py", line 187, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/local/lib/python3.10/runpy.py", line 146, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/local/lib/python3.10/runpy.py", line 110, in _get_module_details
    __import__(pkg_name)
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/bandit/__init__.py", line 7, in <module>
    from bandit.core import config # noqa
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/bandit/core/__init__.py", line 5, in <module>
    from bandit.core import config # noqa
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/bandit/core/config.py", line 15, in <module>
    from bandit.core import extension_loader
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/bandit/core/extension_loader.py", line 109, in <module>
    MANAGER = Manager()
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/bandit/core/extension_loader.py", line 21, in __init__
    self.load_formatters(formatters_namespace)
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/bandit/core/extension_loader.py", line 26, in load_formatters
    self.formatters_mgr = extension.ExtensionManager(
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/stevedore/extension.py", line 133, in __init__
    extensions = self._load_plugins(invoke_on_load,
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/stevedore/extension.py", line 218, in _load_plugins
    for ep in self.list_entry_points():
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/stevedore/extension.py", line 207, in list_entry_points
    eps = list(_cache.get_group_all(self.namespace))
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/stevedore/_cache.py", line 179, in get_group_all
    data = self._get_data_for_path(path)
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/stevedore/_cache.py", line 162, in _get_data_for_path
    data = _build_cacheable_data(path)
  File "/builds/xsoar/content/venv/lib/python3.10/site-packages/stevedore/_cache.py", line 107, in _build_cacheable_data
    real_groups = importlib_metadata.entry_points()
  File "/usr/local/lib/python3.10/importlib/metadata/__init__.py", line 971, in entry_points
    return SelectableGroups.load(eps).select(**params)
  File "/usr/local/lib/python3.10/importlib/metadata/__init__.py", line 429, in load
    ordered = sorted(eps, key=by_group)
  File "/usr/local/lib/python3.10/importlib/metadata/__init__.py", line 968, i...

Read more...

Changed in pbr:
status: Incomplete → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on pbr (master)

Change abandoned by "Daniel Bengtsson <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/pbr/+/841222
Reason: No activity for a long time and no answer to my last question. I close it, feel free to reopen it if it was an error.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.