Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd2d6d86

Browse files
committed
gh-104773: PEP 594: Remove the imghdr module
* 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.
1 parent77d7ec5 commitd2d6d86

27 files changed

+18
-424
lines changed

‎Doc/library/imghdr.rst

Lines changed: 0 additions & 86 deletions
This file was deleted.

‎Doc/library/superseded.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ backwards compatibility. They have been superseded by other modules.
1010

1111
..toctree::
1212

13-
imghdr.rst
1413
optparse.rst

‎Doc/whatsnew/3.11.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1735,7 +1735,7 @@ Modules
17351735
+---------------------+---------------------+---------------------+---------------------+---------------------+
17361736
|:mod:`!audioop`|:mod:`!crypt`|:mod:`!nis`|:mod:`!sndhdr`|:mod:`!uu`|
17371737
+---------------------+---------------------+---------------------+---------------------+---------------------+
1738-
|:mod:`!cgi`|:mod:`imghdr`|:mod:`!nntplib`|:mod:`!spwd`|:mod:`!xdrlib`|
1738+
|:mod:`!cgi`|:mod:`!imghdr`|:mod:`!nntplib`|:mod:`!spwd`|:mod:`!xdrlib`|
17391739
+---------------------+---------------------+---------------------+---------------------+---------------------+
17401740
|:mod:`!cgitb`|:mod:`!mailcap`|:mod:`!ossaudiodev`|:mod:`!sunau`||
17411741
+---------------------+---------------------+---------------------+---------------------+---------------------+

‎Doc/whatsnew/3.12.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ Modules (see :pep:`594`):
924924
*:mod:`!cgitb`
925925
*:mod:`!chunk`
926926
*:mod:`!crypt`
927-
*:mod:`imghdr`
927+
*:mod:`!imghdr`
928928
*:mod:`!mailcap`
929929
*:mod:`!msilib`
930930
*:mod:`!nis`

‎Doc/whatsnew/3.13.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,13 @@ Removed
230230
*:pep:`594`: Remove the:mod:`!chunk` module, deprecated in Python 3.11.
231231
(Contributed by Victor Stinner in:gh:`104773`.)
232232

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

234241
Porting to Python 3.13
235242
======================

‎Doc/whatsnew/3.5.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,7 @@ Oberkirch in :issue:`21800`.)
12521252
imghdr
12531253
------
12541254

1255-
The:func:`~imghdr.what` function now recognizes the
1255+
The:func:`~!imghdr.what` function now recognizes the
12561256
`OpenEXR<https://www.openexr.com>`_ format
12571257
(contributed by Martin Vignali and Claudiu Popa in:issue:`20295`),
12581258
and the `WebP<https://en.wikipedia.org/wiki/WebP>`_ format

‎Lib/imghdr.py

Lines changed: 0 additions & 180 deletions
This file was deleted.

‎Lib/test/imghdrdata/python-raw.jpg

-525 Bytes
Binary file not shown.

‎Lib/test/imghdrdata/python.bmp

-1.13 KB
Binary file not shown.

‎Lib/test/imghdrdata/python.exr

-2.57 KB
Binary file not shown.

‎Lib/test/imghdrdata/python.jpg

-543 Bytes
Binary file not shown.

‎Lib/test/imghdrdata/python.pbm

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎Lib/test/imghdrdata/python.ras

-1.03 KB
Binary file not shown.

‎Lib/test/imghdrdata/python.sgi

-1.92 KB
Binary file not shown.

‎Lib/test/imghdrdata/python.tiff

-1.29 KB
Binary file not shown.

‎Lib/test/imghdrdata/python.webp

-432 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp