Skip to content

Fix pkg_resources ImportError on Python 3.12+/pipx environments (Issu…#45

Open
cr2829 wants to merge 1 commit intoagroce:masterfrom
cr2829:issue#40
Open

Fix pkg_resources ImportError on Python 3.12+/pipx environments (Issu…#45
cr2829 wants to merge 1 commit intoagroce:masterfrom
cr2829:issue#40

Conversation

@cr2829
Copy link
Copy Markdown

@cr2829 cr2829 commented Apr 19, 2026

…e #40)

Replace pkg_resources with importlib.resources (stdlib) for loading bundled .rules files. Python 3.9+ uses the modern files() API directly; older versions try importlib.resources first and fall back to pkg_resources. Also add init.py to universalmutator/static/ and universalmutator/comby/ so that importlib.resources.files() can traverse them as sub-packages.

Fixes #40

…agroce#40)

Replace pkg_resources with importlib.resources (stdlib) for loading bundled
.rules files. Python 3.9+ uses the modern files() API directly; older versions
try importlib.resources first and fall back to pkg_resources. Also add
__init__.py to universalmutator/static/ and universalmutator/comby/ so that
importlib.resources.files() can traverse them as sub-packages.

Fixes agroce#40

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

Make universalmutator work right on python 3.12+ / pipx and other environments where pkg_resources is no longer available

1 participant