-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
🔗 pythonrelated technology: pythonrelated technology: python🛠 refactorchange type: refactorchange type: refactor
Milestone
Description
The imghdr module is being deprected in 3.11 and will be removed in 3.13. See PEP 594 for details.
We currently use it only in one area:
| image = imghdr.what(None, stream) |
Alternatives would be:
- Just use the
mimetypemodule? We were using only themimetypemodule until @b83a659 where we used a 'hack' to detect the type from the byte stream. This was then replaced by theimghdrmodule which did the same thing better. - Use a library called filetype to detect images. This was recommended by the PEP.
- Just copy the python source of the
imghdrmodule into ours?
Metadata
Metadata
Assignees
Labels
🔗 pythonrelated technology: pythonrelated technology: python🛠 refactorchange type: refactorchange type: refactor