Closed jreadey closed 1 month ago
The python 3.12 workflows are failing due to an import error:
________________ ERROR collecting tests/unit/chunk_util_test.py ________________
ImportError while importing test module '/home/runner/work/hsds/hsds/tests/unit/chunk_util_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/opt/hostedtoolcache/Python/3.12.6/x64/lib/python3.12/importlib/__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/unit/chunk_util_test.py:18: in <module>
from hsds.util.dsetUtil import getHyperslabSelection
hsds/util/dsetUtil.py:16: in <module>
from .. import hsds_logger as log
hsds/hsds_logger.py:19: in <module>
from .util.domainUtil import getDomainFromRequest
hsds/util/domainUtil.py:17: in <module>
from .. import config
hsds/config.py:15: in <module>
from pkg_resources import resource_filename
E ModuleNotFoundError: No module named 'pkg_resources'
Looks like something became deprecated - maybe try the solution here?
Looks like pgk_resources was removed in Python 3.12. Have replaced with importlib_resouces.
Changes: