-
Notifications
You must be signed in to change notification settings - Fork 102
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 is deprecated and slated for removal in Python 3.13 #462
Comments
See also #443 |
It would be great to have this issue resolved now that Python 3.13 has been released and the imghdr module has been removed. PR #443 already proposes a potential solution. |
Fedora 41, Arch, openSUSE Tumbleweed are now shipped with Python 3.13 which prevent the usage of this library in some cases. |
- drop support for python 3.8, which is EOLed - add official support for python 3.13 - ...which sadly requires using a fork of PGPy; see discussion at: - SecurityInnovation/PGPy#462 - SecurityInnovation/PGPy#443 - update zstandard library, addressing #21 - update other libraries: - cryptography - ruff - mypy - remove use of [email protected] from the macos/darwin tooling in the Makefile - include type hints (#20); thank you @tim25651!
- drop support for python 3.8, which is EOLed - add official support for python 3.13 - ...which sadly requires using a fork of PGPy; see discussion at: - SecurityInnovation/PGPy#462 - SecurityInnovation/PGPy#443 - update zstandard library, addressing #21 - update other libraries: - cryptography - ruff - mypy - remove use of [email protected] from the macos/darwin tooling in the Makefile - include type hints (#20); thank you @tim25651! Co-authored-by: Nathan J. Mehl <[email protected]>
In some frustration, I have published to pypi a (hopefully) temporary fork of PGPy, https://pypi.org/project/PGPy13/ I do not want to be a long-term maintainer of a fork of PGPy, and my hope is that @Commod0re or some other person at SecurityInnovation will resume maintenance of this project, and which point I will yank PGPy13 v0.6.1rc1 from PyPi. In the meantime however, this should be a drop-in replacement that allows current users to continue using this project on modern releases of python. |
The
imghdr
module is deprecated in Python 3.11 (see here) and slated for removal in Python 3.13.imghdr
is used to determine image type:PGPy/pgpy/constants.py
Lines 430 to 435 in 30a7571
If just looking for the JPEG type, maybe a simple fix to get rid of
imghdr
would be to look at the signature in the first few bytes of the image data like:?
The text was updated successfully, but these errors were encountered: