Closed mikegerber closed 1 month ago
I can reproduce locally (clean 3.12 pyenv virtualenv, with requirements*.txt
installed):
❯ pytest
======================================== test session starts =========================================
platform linux -- Python 3.12.3, pytest-8.2.2, pluggy-1.5.0
rootdir: /home/b-mg106/devel/dinglehopper
configfile: pyproject.toml
plugins: anyio-4.4.0, cov-5.0.0, mypy-0.10.3, ruff-0.3.2
collected 76 items / 1 error
=============================================== ERRORS ===============================================
___________________ ERROR collecting src/dinglehopper/tests/test_integ_ocrd_cli.py ___________________
ImportError while importing test module '/home/b-mg106/devel/dinglehopper/src/dinglehopper/tests/test_integ_ocrd_cli.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../../.pyenv/versions/3.12.3/lib/python3.12/importlib/__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
src/dinglehopper/tests/test_integ_ocrd_cli.py:10: in <module>
from ..ocrd_cli import ocrd_dinglehopper
src/dinglehopper/ocrd_cli.py:8: in <module>
from pkg_resources import resource_string
E ModuleNotFoundError: No module named 'pkg_resources'
====================================== short test summary info =======================================
ERROR src/dinglehopper/tests/test_integ_ocrd_cli.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========================================== 1 error in 9.87s ==========================================
This is fun:
importlib.resources.read_text()
gives a DeprecationWarning
in 3.12importlib.resources.files()
etc. is only usable from 3.9...💩
4047f8b fixes this by using the backports in PyPI's importlib_resources + the recommended files().joinpath().read_text()
method.
👀 @kba @bertsky This might come up elsewhere when on Python 3.12
Reopening: needs new release.
(Not sure why this didn't come up with my earlier tests on Python 3.12 - might be a setuptools update that caused this.)
Reopening: needs new release.
https://github.com/qurator-spk/dinglehopper/releases/tag/v0.9.7
From GitHub Actions log: