From 88a4db283791234d7afe10c3a974880ca4f458e4 Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Wed, 15 Oct 2025 10:58:03 -0400 Subject: [PATCH 01/11] Add `application/texinfo` as official MIME type in mimetypes.py --- Lib/mimetypes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index 6c0efb671975d4..f293e48051b7fa 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -549,8 +549,8 @@ def _default_mime_types(): '.tar' : 'application/x-tar', '.tcl' : 'application/x-tcl', '.tex' : 'application/x-tex', - '.texi' : 'application/x-texinfo', - '.texinfo': 'application/x-texinfo', + '.texi' : 'application/texinfo', + '.texinfo': 'application/texinfo', '.roff' : 'application/x-troff', '.t' : 'application/x-troff', '.tr' : 'application/x-troff', From e9010e96dfe3733e0b311cbbb19e921d44e71d32 Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Wed, 15 Oct 2025 11:03:06 -0400 Subject: [PATCH 02/11] Use `application/texinfo` in test_mimetypes.py --- Lib/test/test_mimetypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_mimetypes.py b/Lib/test/test_mimetypes.py index a29815bf49b1e7..0891a87bcbc9de 100644 --- a/Lib/test/test_mimetypes.py +++ b/Lib/test/test_mimetypes.py @@ -247,7 +247,7 @@ def check_extensions(): ("application/x-debian-package", ".deb"), ("application/x-httpd-php", ".php"), ("application/x-rpm", ".rpm"), - ("application/x-texinfo", ".texi"), + ("application/texinfo", ".texi"), ("application/x-troff", ".roff"), ("application/xml", ".xsl"), ("application/yaml", ".yaml"), From 0f436b8d8cb2501e83c0c6c6ae36bb79cdf3dad0 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Wed, 15 Oct 2025 15:10:36 +0000 Subject: [PATCH 03/11] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20b?= =?UTF-8?q?lurb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst diff --git a/Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst b/Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst new file mode 100644 index 00000000000000..5763fb657b5e2f --- /dev/null +++ b/Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst @@ -0,0 +1 @@ +Per https://www.iana.org/assignments/media-types/application/texinfo, the `.texi` and `.texinfo` file formats has an officially-registered MIME type, thus deprecating the application/x-texinfo alias. From f4548a3fee07dd2b63c1d31a74f4cd3712ad8b9f Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Wed, 15 Oct 2025 11:16:25 -0400 Subject: [PATCH 04/11] Lint --- .../next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst b/Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst index 5763fb657b5e2f..8fc933fcfc93b0 100644 --- a/Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst +++ b/Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst @@ -1 +1 @@ -Per https://www.iana.org/assignments/media-types/application/texinfo, the `.texi` and `.texinfo` file formats has an officially-registered MIME type, thus deprecating the application/x-texinfo alias. +Per https://www.iana.org/assignments/media-types/application/texinfo, the .texi and .texinfo file formats has an officially-registered MIME type, thus deprecating the application/x-texinfo alias. From 3ed4d17e6ec18d99700ed721cfe6d326f4b82ce7 Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Wed, 15 Oct 2025 12:13:17 -0400 Subject: [PATCH 05/11] Update 3.15.rst --- Doc/whatsnew/3.15.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 56028a92aa2e29..6172f3c3b175b7 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -682,6 +682,7 @@ mimetypes --------- * Add ``application/toml``. (Contributed by Gil Forcada in :gh:`139959`.) +* Rename ``application/x-texinfo`` to `application/texinfo` (Contributed by Charlie Lin in :gh:`140165`) pathlib From 28dcb46ef9b629d61539fd5829caaec75302ba54 Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Wed, 15 Oct 2025 12:14:27 -0400 Subject: [PATCH 06/11] Sort mimetypes.py --- Lib/mimetypes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index f293e48051b7fa..48a9f430d45262 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -500,6 +500,8 @@ def _default_mime_types(): '.ps' : 'application/postscript', '.ai' : 'application/postscript', '.eps' : 'application/postscript', + '.texi' : 'application/texinfo', + '.texinfo': 'application/texinfo', '.toml' : 'application/toml', '.trig' : 'application/trig', '.m3u' : 'application/vnd.apple.mpegurl', @@ -549,8 +551,6 @@ def _default_mime_types(): '.tar' : 'application/x-tar', '.tcl' : 'application/x-tcl', '.tex' : 'application/x-tex', - '.texi' : 'application/texinfo', - '.texinfo': 'application/texinfo', '.roff' : 'application/x-troff', '.t' : 'application/x-troff', '.tr' : 'application/x-troff', From 3f4f826f9fcf92a044b49570756a54b4d3632b56 Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Wed, 15 Oct 2025 12:15:32 -0400 Subject: [PATCH 07/11] Sort test_mimetypes.py --- Lib/test/test_mimetypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_mimetypes.py b/Lib/test/test_mimetypes.py index 0891a87bcbc9de..746984ec0ca9df 100644 --- a/Lib/test/test_mimetypes.py +++ b/Lib/test/test_mimetypes.py @@ -230,6 +230,7 @@ def check_extensions(): ("application/gzip", ".gz"), ("application/ogg", ".ogx"), ("application/postscript", ".ps"), + ("application/texinfo", ".texi"), ("application/toml", ".toml"), ("application/vnd.apple.mpegurl", ".m3u"), ("application/vnd.ms-excel", ".xls"), @@ -247,7 +248,6 @@ def check_extensions(): ("application/x-debian-package", ".deb"), ("application/x-httpd-php", ".php"), ("application/x-rpm", ".rpm"), - ("application/texinfo", ".texi"), ("application/x-troff", ".roff"), ("application/xml", ".xsl"), ("application/yaml", ".yaml"), From a09a36e442723450186807896bd5825f89486e28 Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Wed, 15 Oct 2025 12:17:30 -0400 Subject: [PATCH 08/11] Reword 2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst --- .../next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst b/Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst index 8fc933fcfc93b0..4d9934bbd663ae 100644 --- a/Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst +++ b/Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst @@ -1 +1 @@ -Per https://www.iana.org/assignments/media-types/application/texinfo, the .texi and .texinfo file formats has an officially-registered MIME type, thus deprecating the application/x-texinfo alias. +Per https://www.iana.org/assignments/media-types/application/texinfo, the ``.texi`` and ``.texinfo`` file formats has an officially-registered MIME type, ``application/texinfo`` Therefore remove the outdated ``application/x-texinfo`` alias. From 4a204b3c19b1e553f6d207d69c5142d85fa4267a Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Wed, 15 Oct 2025 12:20:33 -0400 Subject: [PATCH 09/11] Remove backticks in 2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst To shut sphynx linters about this utterly-trivial issue... --- .../next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst b/Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst index 4d9934bbd663ae..e688f4800e8aa2 100644 --- a/Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst +++ b/Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst @@ -1 +1 @@ -Per https://www.iana.org/assignments/media-types/application/texinfo, the ``.texi`` and ``.texinfo`` file formats has an officially-registered MIME type, ``application/texinfo`` Therefore remove the outdated ``application/x-texinfo`` alias. +Per https://www.iana.org/assignments/media-types/application/texinfo, the .texi and .texinfo file formats has an officially-registered MIME type, application/texinfo Therefore remove the outdated application/x-texinfo alias. From ae72a3e7a85a72400bf7dd5fc4d2cb23a5aa56a7 Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Wed, 15 Oct 2025 12:28:05 -0400 Subject: [PATCH 10/11] Update Doc/whatsnew/3.15.rst Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> --- Doc/whatsnew/3.15.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 6172f3c3b175b7..6a8f037035866b 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -682,7 +682,8 @@ mimetypes --------- * Add ``application/toml``. (Contributed by Gil Forcada in :gh:`139959`.) -* Rename ``application/x-texinfo`` to `application/texinfo` (Contributed by Charlie Lin in :gh:`140165`) +* Rename ``application/x-texinfo`` to ``application/texinfo``. + (Contributed by Charlie Lin in :gh:`140165`) pathlib From 002923f721c9e33f070e7df2d236e4493e128c83 Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Wed, 15 Oct 2025 12:33:27 -0400 Subject: [PATCH 11/11] Update Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> --- .../next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst b/Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst index e688f4800e8aa2..c140db9dcd5150 100644 --- a/Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst +++ b/Misc/NEWS.d/next/Library/2025-10-15-15-10-34.gh-issue-140166.NtxRez.rst @@ -1 +1 @@ -Per https://www.iana.org/assignments/media-types/application/texinfo, the .texi and .texinfo file formats has an officially-registered MIME type, application/texinfo Therefore remove the outdated application/x-texinfo alias. +:mod:`mimetypes`: Per the `IANA assignment `_, update the MIME type for the ``.texi`` and ``.texinfo`` file formats to ``application/texinfo``, instead of ``application/x-texinfo``.