Skip to content

Fix importlib resources deprecation#99

Open
apples-kksk wants to merge 1 commit into
hexgrad:mainfrom
apples-kksk:fix-importlib-resources-warning
Open

Fix importlib resources deprecation#99
apples-kksk wants to merge 1 commit into
hexgrad:mainfrom
apples-kksk:fix-importlib-resources-warning

Conversation

@apples-kksk
Copy link
Copy Markdown

Requested

Issue #81 reports a deprecation warning from importlib.resources.open_text.

Implemented

  • Replaced open_text usage with the modern files(...).joinpath(...).read_text(...) resource API.
  • Added a Python < 3.9 conditional importlib-resources dependency for the backport path.
  • Added a regression test that fails if the deprecated open_text path is used.

Not covered

No pronunciation or dictionary content behavior changes are included.

Validated

  • PYTHONPATH=. pytest -q tests/test_resource_loading.py
  • PYTHONPATH=. python -m py_compile misaki/en.py misaki/cutlet.py tests/test_resource_loading.py
  • git diff --check

@apples-kksk apples-kksk force-pushed the fix-importlib-resources-warning branch from 1c39f5b to f750755 Compare May 13, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant