diff options
author | Brett Cannon <brett@python.org> | 2022-04-13 17:47:41 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-13 17:47:41 (GMT) |
commit | 3fc57e8f6ff925b561b03c46bcf5bd323782c19c (patch) | |
tree | a69bfe3acdb5be3ee7ffc0536d15397a39580800 /Lib/test | |
parent | dfbc792a4b1e033d6628eda463c0933aef081bbe (diff) | |
download | cpython-3fc57e8f6ff925b561b03c46bcf5bd323782c19c.zip cpython-3fc57e8f6ff925b561b03c46bcf5bd323782c19c.tar.gz cpython-3fc57e8f6ff925b561b03c46bcf5bd323782c19c.tar.bz2 |
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/test')
-rw-r--r-- | Lib/test/test_email/test_email.py | 2 | ||||
-rw-r--r-- | Lib/test/test_imghdr.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py index ca9c773..b87dae2 100644 --- a/Lib/test/test_email/test_email.py +++ b/Lib/test/test_email/test_email.py @@ -7,6 +7,7 @@ import time import base64 import unittest import textwrap +import warnings from io import StringIO, BytesIO from itertools import chain @@ -1591,7 +1592,6 @@ class TestMIMEImage(unittest.TestCase): header='foobar'), missing) - # Test the basic MIMEApplication class class TestMIMEApplication(unittest.TestCase): def test_headers(self): diff --git a/Lib/test/test_imghdr.py b/Lib/test/test_imghdr.py index ca0a0b2..208c8ee 100644 --- a/Lib/test/test_imghdr.py +++ b/Lib/test/test_imghdr.py @@ -1,12 +1,13 @@ -import imghdr import io import os import pathlib import unittest import warnings -from test.support import findfile +from test.support import findfile, warnings_helper from test.support.os_helper import TESTFN, unlink +imghdr = warnings_helper.import_deprecated("imghdr") + TEST_FILES = ( ('python.png', 'png'), |