-
Notifications
You must be signed in to change notification settings - Fork 33
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
For Python 3.13: A drop-in replacement for imghdr.what()
#72
Comments
Oddly I was thinking of this the other day, I've not used |
%
Source code: https://github.com/python/cpython/blob/3.12/Lib/imghdr.py %
|
That's super basic, at a guess we could go with a very basic shim:
Add a def for |
- Adding #72 #75 #76 #81 `.what()` to be a drop in replacement for `imghdr.what()` (thanks to Christian Clauss and Andy - NebularNerd) - Adding #67 Test on Python 3.13 beta (thanks to Christian Clauss) - Adding #77 from __future__ import annotations (thanks to Christian Clauss - Fixing #66 Confidence sorting (thanks to Andy - NebularNerd) --------- Co-authored-by: Andy <[email protected]> Co-authored-by: Christian Clauss <[email protected]>
Released in https://github.com/cdgriffith/puremagic/releases/tag/1.24 thanks! |
Given the discussion in #67 about
imghdr
being removed from the Python Standard Library, it might be quite helpful to have a drop-in replacement forimghdr.what()
. It would provide a smooth transition to Py3.13 if developers could confidently replace all instances ofimghdr.what()
withpuremagic.what()
-- same args, same results.The text was updated successfully, but these errors were encountered: