aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/imghdr.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2022-04-13 10:47:41 -0700
committerGitHub <noreply@github.com>2022-04-13 10:47:41 -0700
commit3fc57e8f6ff925b561b03c46bcf5bd323782c19c (patch)
treea69bfe3acdb5be3ee7ffc0536d15397a39580800 /Lib/imghdr.py
parentdfbc792a4b1e033d6628eda463c0933aef081bbe (diff)
downloadcpython-3fc57e8f6ff925b561b03c46bcf5bd323782c19c.tar.gz
cpython-3fc57e8f6ff925b561b03c46bcf5bd323782c19c.zip
gh-91217: deprecate imghdr (#91461)
* Deprecate imghdr Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> * Update Doc/whatsnew/3.11.rst Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> * Inline `imghdr` into `email.mime.image` Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Barry Warsaw <barry@python.org>
Diffstat (limited to 'Lib/imghdr.py')
-rw-r--r--Lib/imghdr.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/imghdr.py b/Lib/imghdr.py
index afcb67772ee..6a372e66c7f 100644
--- a/Lib/imghdr.py
+++ b/Lib/imghdr.py
@@ -1,9 +1,14 @@
"""Recognize image file formats based on their first few bytes."""
from os import PathLike
+import warnings
__all__ = ["what"]
+
+warnings._deprecated(__name__, remove=(3, 13))
+
+
#-------------------------#
# Recognize image headers #
#-------------------------#