When running with < python 3.8 flavor, eg: py37-stevedore, a load eventually fails with: ... File "/usr/local/lib/python3.7/site-packages/stevedore/extension.py", line 19, in <module> from . import _cache File "/usr/local/lib/python3.7/site-packages/stevedore/_cache.py", line 18, in <module> import importlib.metadata as importlib_metadata ModuleNotFoundError: No module named 'importlib.metadata' The code line in _cache.py has: import importlib.metadata as importlib_metadata But in python versions before 3.8, importlib.metadata is stored under importlib_metadata. Changing the line to read: import importlib_metadata fixes the problem. I think a conditional patch depending on flavor is required for the port.
Hi, the support for Python 3.7 expires on 2023-06-27 (see https://cgit.freebsd.org/ports/tree/lang/python37/Makefile#n16 ), while stevedore dropped it with version 4.1.1. I can only add a temporary patch until that date.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=0780a2be805d9d57d0e395ab62eceac005940bf4 commit 0780a2be805d9d57d0e395ab62eceac005940bf4 Author: Nicola Vitale <nivit@FreeBSD.org> AuthorDate: 2023-04-03 15:16:49 +0000 Commit: Nicola Vitale <nivit@FreeBSD.org> CommitDate: 2023-04-03 15:16:49 +0000 devel/py-stevedore: Update to 5.0.0 - Add a set of patches for supporting Python 3.7 until 2023-06-27 when lang/python37 expires. [1] Those patches are taken from: https ://opendev.org/openstack/stevedore/commit/ccd17543a37143913e886f9306be10d40260fdf3 PR: 270608 Reported by: Jonathan Chen <jonc@chen.org.nz> [1] devel/py-stevedore/Makefile | 4 ++-- devel/py-stevedore/distinfo | 6 +++--- .../files/patch-stevedore___cache.py (new) | 25 ++++++++++++++++++++++ .../patch-stevedore_tests_test__driver.py (new) | 18 ++++++++++++++++ .../patch-stevedore_tests_test__extension.py (new) | 21 ++++++++++++++++++ .../patch-stevedore_tests_test__sphinxext.py (new) | 18 ++++++++++++++++ 6 files changed, 87 insertions(+), 5 deletions(-)
Thanks for this! Yes, I know that python 3.7 is out of date, but unfortunately I'm required to use it to support legacy systems :(
Thank you for the PR!