KindleUnpack
KindleUnpack copied to clipboard
imghdr used in cover will be removed in python 3.13
https://github.com/kevinhendricks/KindleUnpack/blob/master/lib/mobi_cover.py#L11
From https://docs.python.org/3/library/imghdr.html
Deprecated since version 3.11, will be removed in version 3.13: The imghdr module is deprecated (see PEP 594 for details and alternatives).
None of the suggested replacements in the PEP support python 2. Could adopt imghdr into projector add additional checks to existing code for types we care about.
I do have a project https://github.com/clach04/magic-fork which might be suitable .
We will keep it in mind but we still have plenty of time since it was just deprecated in 3.11.
filetype might be an option.
We may decide to remove python2 support since all work on kfx input seems to be python3 only.
Also, since the current python lib imghdr.py is a simple self-contained module we may just decide to include a version of it as part of kindleunpack.
Another alternative is PureMagic, imghdr support was recently built into it. You should be able to use it as a drop-in replacement without modification.