Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace imghdr for python 3.13 support #146

Closed
jamesjer opened this issue May 16, 2024 · 2 comments · Fixed by #148
Closed

Replace imghdr for python 3.13 support #146

jamesjer opened this issue May 16, 2024 · 2 comments · Fixed by #148

Comments

@jamesjer
Copy link

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:

@takluyver
Copy link
Owner

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.

@paugier
Copy link

paugier commented Dec 8, 2024

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 h2non/filetype.py#188)

In contrast, puremagic has a recent release (https://pypi.org/project/puremagic/#history).

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 a pull request may close this issue.

3 participants