Replace imghdr for python 3.13 support
The Fedora project is currently building all python packages with python 3.13.0b1 to catch problems before the release of python 3.13. The bash_kernel package fails to build, because the imghdr module, which was deprecated in python 3.11, has been removed. Suggested replacements:
Thanks, good point. I'd forgotten we were using the old imghdr module here.
I might be tempted to hardcode magic numbers for a limited list of file types into this project - say png, webp, jpeg, gif, bmp - to keep things simple. Otherwise, of those 3 projects, I'd suggest not python-magic, as that's a wrapper around a C library, which is an added headache. The other two look pretty similar at first glance.
It would be useful that Python 3.13 be supported.
filetype seems nice and with an active repo but the last version was released on 2022: https://pypi.org/project/filetype/#history (see also https://github.com/h2non/filetype.py/issues/188)
In contrast, puremagic has a recent release (https://pypi.org/project/puremagic/#history).