FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-104773: PEP 594: Remove the imghdr module by vstinner · Pull Request #104777 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .bmp  (1) .exr  (1) .gif  (1) .h  (1) .in  (1) .jpg  (2) .pbm  (1) .pgm  (1) .png  (1) .ppm  (1) .py  (4) .ras  (1) .rst  (7) .sgi  (1) .tiff  (1) .txt  (1) .webp  (1) .xbm  (1) All 18 file types selected
Only manifest files
Deleted files Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
86 changes: 0 additions & 86 deletions Doc/library/imghdr.rst

This file was deleted.

1 change: 0 additions & 1 deletion Doc/library/superseded.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ backwards compatibility. They have been superseded by other modules.

.. toctree::

imghdr.rst
optparse.rst
3 changes: 2 additions & 1 deletion Doc/requirements.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
# Sphinx version is pinned so that new versions that introduce new warnings
# won't suddenly cause build failures. Updating the version is fine as long
# as no warnings are raised by doing so.
sphinx==4.5.0
# PR #104777: Sphinx 6.2 no longer uses imghdr, removed in Python 3.13.
sphinx==6.2.0

blurb

Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.11.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1735,7 +1735,7 @@ Modules
+---------------------+---------------------+---------------------+---------------------+---------------------+
| :mod:`!audioop` | :mod:`!crypt` | :mod:`!nis` | :mod:`!sndhdr` | :mod:`!uu` |
+---------------------+---------------------+---------------------+---------------------+---------------------+
| :mod:`!cgi` | :mod:`imghdr` | :mod:`!nntplib` | :mod:`!spwd` | :mod:`!xdrlib` |
| :mod:`!cgi` | :mod:`!imghdr` | :mod:`!nntplib` | :mod:`!spwd` | :mod:`!xdrlib` |
+---------------------+---------------------+---------------------+---------------------+---------------------+
| :mod:`!cgitb` | :mod:`!mailcap` | :mod:`!ossaudiodev` | :mod:`!sunau` | |
+---------------------+---------------------+---------------------+---------------------+---------------------+
Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.12.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ Modules (see :pep:`594`):
* :mod:`!cgitb`
* :mod:`!chunk`
* :mod:`!crypt`
* :mod:`imghdr`
* :mod:`!imghdr`
* :mod:`!mailcap`
* :mod:`!msilib`
* :mod:`!nis`
Expand Down
8 changes: 8 additions & 0 deletions Doc/whatsnew/3.13.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,14 @@ Removed
:class:`typing.TypedDict` types, deprecated in Python 3.11.
(Contributed by Tomas Roun in :gh:`104786`.)

* :pep:`594`: Remove the :mod:`!imghdr` module, deprecated in Python 3.11:
use the projects
`filetype <https://pypi.org/project/filetype/>`_,
`puremagic <https://pypi.org/project/puremagic/>`_,
or `python-magic <https://pypi.org/project/python-magic/>`_ instead.
(Contributed by Victor Stinner in :gh:`104773`.)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Reference the PEP.



Porting to Python 3.13
======================

Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.5.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ Oberkirch in :issue:`21800`.)
imghdr
------

The :func:`~imghdr.what` function now recognizes the
The :func:`~!imghdr.what` function now recognizes the
`OpenEXR <https://www.openexr.com>`_ format
(contributed by Martin Vignali and Claudiu Popa in :issue:`20295`),
and the `WebP <https://en.wikipedia.org/wiki/WebP>`_ format
Expand Down
180 changes: 0 additions & 180 deletions Lib/imghdr.py

This file was deleted.

Binary file removed Lib/test/imghdrdata/python-raw.jpg
Binary file not shown.
Binary file removed Lib/test/imghdrdata/python.bmp
Binary file not shown.
Binary file removed Lib/test/imghdrdata/python.exr
Binary file not shown.
Binary file removed Lib/test/imghdrdata/python.jpg
Binary file not shown.
3 changes: 0 additions & 3 deletions Lib/test/imghdrdata/python.pbm

This file was deleted.

Binary file removed Lib/test/imghdrdata/python.ras
Binary file not shown.
Binary file removed Lib/test/imghdrdata/python.sgi
Binary file not shown.
Binary file removed Lib/test/imghdrdata/python.tiff
Binary file not shown.
Binary file removed Lib/test/imghdrdata/python.webp
Binary file not shown.
Loading

Back | FazBrowse Home | New Git URL