community
community copied to clipboard
`imghdr` is deprecated and slated for removal in Python 3.13
We currently make use of the imghdr module to guess the filetype with our ImageLoader.
See: https://peps.python.org/pep-0594/#imghdr
Is this issue up for grab? Id like to contribute to this!
Is this issue up for grab? Id like to contribute to this!
Yes. Is still available. (And I now assigned it to you)
Thank you!
Thank you so much! id like to contribute with another person. It would be great if you could assign it to them too!
Their github link : https://github.com/vsh9
@bharathan06 I don't think this issue needs two people to solve :thinking:, imghdr is only used to find the extension of the image file,
see https://github.com/kivy/kivy/blob/ca1b918c656f23e401707388f25f4a63d9b8ae7d/kivy/core/image/init.py#L452-L461
I propose using filetype as it supports a lot of file types
I propose using filetype as it supports a lot of file types
I think it's better to use magic number to detect a subset of the fileformat ( same method used by imghdr )
I propose using filetype as it supports a lot of file types
I think it's better to use magic number to detect a subset of the fileformat ( same method used by imghdr )
from filetype docs
Small and dependency-free Python package to infer file type and MIME type checking the magic numbers signature of a file or buffer.
@bharathan06: Just checking in. How did you go with this?
I'm considering @bharathan06 not available anymore to take care of it, the issue is now in 3.0.0 roadmap and free to pick.
@misl6 i want to take on it.
That's something lovely to hear @kengoon !
Assigned the issue. Please bear in mind that we're in 3.0.0, so don't be afraid to do any refactoring / cleanup if needed.