qurator-spk/dinglehopper

ocrd_utils DeprecationWarning

Closed this issue · 2 comments

qurator/dinglehopper/tests/test_integ_ocrd_cli.py::test_ocrd_cli
qurator/dinglehopper/tests/test_integ_ocrd_cli.py::test_ocrd_cli
  /home/circleci/.pyenv/versions/3.10.10/lib/python3.10/site-packages/ocrd_utils/deprecate.py:27: DeprecationWarning: pageId is deprecated; use page_id
    warnings.warn('{} is deprecated; use {}'.format(alias, new),

qurator/dinglehopper/tests/test_integ_ocrd_cli.py::test_ocrd_cli
qurator/dinglehopper/tests/test_integ_ocrd_cli.py::test_ocrd_cli
  /home/circleci/.pyenv/versions/3.10.10/lib/python3.10/site-packages/ocrd_utils/deprecate.py:27: DeprecationWarning: ID is deprecated; use file_id
    warnings.warn('{} is deprecated; use {}'.format(alias, new),

The issues above are fixed, but there are more DeprecationWarnings when running the tests.

========================================== warnings summary ==========================================../../.pyenv/versions/3.11.2/envs/dinglehopper/lib/python3.11/site-packages/ocrd_utils/package_resources.py:47
../../.pyenv/versions/3.11.2/envs/dinglehopper/lib/python3.11/site-packages/ocrd_utils/package_resources.py:47
../../.pyenv/versions/3.11.2/envs/dinglehopper/lib/python3.11/site-packages/ocrd_utils/package_resources.py:47
  /home/b-mg106/.pyenv/versions/3.11.2/envs/dinglehopper/lib/python3.11/site-packages/ocrd_utils/package_resources.py:47: DeprecationWarning: read_binary is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.    return read_binary(parent_package, resource)

../../.pyenv/versions/3.11.2/envs/dinglehopper/lib/python3.11/site-packages/ocrd_utils/package_resources.py:32
../../.pyenv/versions/3.11.2/envs/dinglehopper/lib/python3.11/site-packages/ocrd_utils/package_resources.py:32
../../.pyenv/versions/3.11.2/envs/dinglehopper/lib/python3.11/site-packages/ocrd_utils/package_resources.py:32
../../.pyenv/versions/3.11.2/envs/dinglehopper/lib/python3.11/site-packages/ocrd_utils/package_resources.py:32
  /home/b-mg106/.pyenv/versions/3.11.2/envs/dinglehopper/lib/python3.11/site-packages/ocrd_utils/package_resources.py:32: DeprecationWarning: path is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    return _file_manager.enter_context(path(parent_package, resource))

(Python 3.11) These seem to be in OCR-D, closing here.