From 8241ec065c025a7c6a4cb28b547c4ee36289a9de Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sat, 22 Jun 2024 09:32:39 +0200 Subject: [PATCH 1/2] docs: puremagic.what() as replacement for imghdr.what() --- Doc/whatsnew/3.13.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index 02c2a5ce02b730..12e752d12f2d97 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -1307,6 +1307,9 @@ PEP 594: dead batteries (and other module removals) * :mod:`!imghdr`: use the projects :pypi:`filetype`, :pypi:`puremagic`, or :pypi:`python-magic` instead. + The `puremagic.what()` function can be used to replace + the `imghdr.what()` function for all file formats that + were supported by `imghdr`. (Contributed by Victor Stinner in :gh:`104773`.) * :mod:`!mailcap`. From bebced1b74aeed759ab305bba1207417cd19dc5b Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sat, 22 Jun 2024 11:42:06 +0200 Subject: [PATCH 2/2] Use double backticks to placate Sphinx linter --- Doc/whatsnew/3.13.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/whatsnew/3.13.rst b/Doc/whatsnew/3.13.rst index 12e752d12f2d97..5c195049980a4b 100644 --- a/Doc/whatsnew/3.13.rst +++ b/Doc/whatsnew/3.13.rst @@ -1307,9 +1307,9 @@ PEP 594: dead batteries (and other module removals) * :mod:`!imghdr`: use the projects :pypi:`filetype`, :pypi:`puremagic`, or :pypi:`python-magic` instead. - The `puremagic.what()` function can be used to replace - the `imghdr.what()` function for all file formats that - were supported by `imghdr`. + The ``puremagic.what()`` function can be used to replace + the ``imghdr.what()`` function for all file formats that + were supported by ``imghdr``. (Contributed by Victor Stinner in :gh:`104773`.) * :mod:`!mailcap`.