Skip to content

Commit

Permalink
pythongh-104773: PEP 594: Remove the imghdr module
Browse files Browse the repository at this point in the history
* Remove the Lib/test/imghdrdata/ directory.
* Copy 5 pictures (gif, png, ppm, pgm, xbm) from removed
  Lib/test/imghdrdata/ to a new Lib/test/tkinterdata/ directory.
  • Loading branch information
vstinner committed May 23, 2023
1 parent 988c1f6 commit ab17e88
Show file tree
Hide file tree
Showing 25 changed files with 17 additions and 423 deletions.
86 changes: 0 additions & 86 deletions Doc/library/imghdr.rst

This file was deleted.

4 changes: 2 additions & 2 deletions Doc/library/sndhdr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ Example:
.. code-block:: pycon
>>> import sndhdr
>>> imghdr.what('bass.wav')
>>> sndhdr.what('bass.wav')
'wav'
>>> imghdr.whathdr('bass.wav')
>>> sndhdr.whathdr('bass.wav')
'wav'
1 change: 0 additions & 1 deletion Doc/library/superseded.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ backwards compatibility. They have been superseded by other modules.
cgitb.rst
chunk.rst
crypt.rst
imghdr.rst
mailcap.rst
msilib.rst
nis.rst
Expand Down
5 changes: 5 additions & 0 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ Deprecated
Removed
=======

* Remove the ``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`.)


Porting to Python 3.13
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

0 comments on commit ab17e88

Please sign in to comment.