Skip to content

Fix pkgutil.find_loader removal in Python 3.14#12206

Open
mwstowe wants to merge 1 commit into
pymedusa:masterfrom
mwstowe:fix/python314-pkgutil-find-loader
Open

Fix pkgutil.find_loader removal in Python 3.14#12206
mwstowe wants to merge 1 commit into
pymedusa:masterfrom
mwstowe:fix/python314-pkgutil-find-loader

Conversation

@mwstowe

@mwstowe mwstowe commented May 17, 2026

Copy link
Copy Markdown

Summary

Replace deprecated pkgutil.find_loader() with importlib.util.find_spec().

Problem

pkgutil.find_loader was deprecated in Python 3.12 and removed in 3.14, causing an AttributeError crash on the /api/v2/config/ endpoint when determining reflink availability.

Fix

Use importlib.util.find_spec('reflink') is not None which is the recommended replacement and works on Python 3.4+.

Replace deprecated pkgutil.find_loader() with importlib.util.find_spec().
pkgutil.find_loader was deprecated in Python 3.12 and removed in 3.14,
causing an AttributeError crash on the /api/v2/config/ endpoint.
@borntohonk

Copy link
Copy Markdown
Contributor

llm vibeslop, already implemented into #12198

you aren't on dev branch

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.

2 participants