-
Notifications
You must be signed in to change notification settings - Fork 997
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
imghdr will be deprecated soon #1453
Comments
Hi, Looking at https://peps.python.org/pep-0594/#imghdr and the recommended replacement alternatives I tend a bit more to puremagic. It looks like a easy usable drop-in replacement. In addition it seems to be a living project. What ever this means... With filetype and python-magic I have mixed feelings as both don't look like active projects. Python support is shown up to version 3.9. What do you think about it? Edit: |
This is a quick one: PR#1455 Test needed for Linux and macOS version of pronterface. Artifacts: Test files used in Pronterface -->Tools -->Projector: ProjectorTestFiles.zip |
Hello, that was fast! I would have suggested that we can remove imghdr and just look at the file extensions. Because in this usecase the images should always have a correct file extension (.png in most cases). But this solution is good too! I tested it on macOS and it works fine. |
I did not investigate other alternatives really.
I did a quick test on Linux though I don't have a resin printer or the like. No errors thrown so it looks OK to me. I'm happy to merge #1455 if you want. |
Then we can merge it. Thanks for testing 🙂 |
Originally reported by Louis-Philippe Véronneau.
imghdr
will be deprecated with Python 3.13. A replacement could befiletype
, though the API is completely different so it will require some work.The text was updated successfully, but these errors were encountered: