Skip to content

Conversation

@arcra
Copy link
Member

@arcra arcra commented Jul 2, 2025

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

@Zamanhuseyinli
Copy link

This was my idea and I will support it.

@arcra
Copy link
Member Author

arcra commented Jul 7, 2025

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

@Zamanhuseyinli
Copy link

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 arcra force-pushed the imghdr_replacement branch from d971de7 to 5bba1c1 Compare July 9, 2025 23:36
@arcra arcra marked this pull request as ready for review July 10, 2025 00:43
@arcra arcra requested a review from rileyajones July 10, 2025 00:43
@arcra arcra merged commit b94d929 into tensorflow:master Jul 11, 2025
13 checks passed
@arcra arcra deleted the imghdr_replacement branch July 11, 2025 19:37
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 this pull request may close these issues.

3 participants