Replaces uses of deprecated imghdr with Pillow to detect image MIME types - #7009
Merged
Conversation
|
This was my idea and I will support it. |
Member
Author
|
@Zamanhuseyinli so sorry for the omission on crediting you for the proposal and contribution! Fixed it in the PR description! I still need to ensure this works correctly when synced into our internal repo, but I'll try to get this done this week. Unfortunately, I found out there are other blockers to make it work with 3.13. I filed #7010 to track this. |
|
It doesn't matter, even though I adapted this idea for myself, I made it to support Python versions such as artificial intelligence 3.13. Even if 3.10 meets the required performance, there are problems. Since the current version is not supported, I would like to help you in any way if you want. |
arcra
marked this pull request as ready for review
July 10, 2025 00:43
rileyajones
approved these changes
Jul 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Solves #6964 - imghdr is deprecated and removed from the standard library in Python 3.13.
This change uses Pillow (https://pypi.org/project/pillow/) as a replacement, as suggested by @Zamanhuseyinli in #7008. (Thanks!)