bash_kernel icon indicating copy to clipboard operation
bash_kernel copied to clipboard

Replace imghdr for python 3.13 support

Open jamesjer opened this issue 1 year ago • 1 comments

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:

jamesjer avatar May 16 '24 16:05 jamesjer

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.

takluyver avatar May 18 '24 12:05 takluyver

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).

paugier avatar Dec 08 '24 21:12 paugier