From 9376db531e4769cc34b15aa05bdcc0a23b6c22e5 Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Fri, 13 Mar 2026 10:17:43 -0400 Subject: [PATCH 1/8] Add MIME types for TTC and Haptics formats Added new MIME types for font collections and haptics. --- Lib/mimetypes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index 60e8c2be1e2504..56741d4be2bc90 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -598,10 +598,14 @@ def _default_mime_types(): '.ra' : 'audio/x-pn-realaudio', '.wav' : 'audio/vnd.wave', '.weba' : 'audio/webm', + '.ttc' : 'font/collection', '.otf' : 'font/otf', '.ttf' : 'font/ttf', '.woff' : 'font/woff', '.woff2' : 'font/woff2', + '.ivs' : 'haptics/ivs', + '.hjif' : 'haptics/hjif', + '.hmpg' : 'haptics/hmpg', '.avif' : 'image/avif', '.bmp' : 'image/bmp', '.emf' : 'image/emf', From d4c7dc83f4ccb0d28e122d63cf89c203aff371f3 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2026 14:23:35 +0000 Subject: [PATCH 2/8] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Library/2026-03-13-14-23-33.gh-issue-145917.TooGKx.rst | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2026-03-13-14-23-33.gh-issue-145917.TooGKx.rst diff --git a/Misc/NEWS.d/next/Library/2026-03-13-14-23-33.gh-issue-145917.TooGKx.rst b/Misc/NEWS.d/next/Library/2026-03-13-14-23-33.gh-issue-145917.TooGKx.rst new file mode 100644 index 00000000000000..b35743598c5af9 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2026-03-13-14-23-33.gh-issue-145917.TooGKx.rst @@ -0,0 +1,6 @@ +Add the following to ``mimetypes``: + +* ``font/collection`` +* ``haptics/ivs`` +* ``haptics/hjif`` +* ``haptics/hmpg`` From c88475de698d54dff583e3992133498c97c0fe58 Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Fri, 13 Mar 2026 10:27:01 -0400 Subject: [PATCH 3/8] Mention in What's New --- Doc/whatsnew/3.15.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index d5b14216770906..0db80967fa86cf 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -836,6 +836,15 @@ mimetypes (Contributed by Charlie Lin in :gh:`145718`.) +* Add the following: + + - ``font/collection`` for ``.ttc`` extension + - ``haptics/ivs`` for ``.ivs` extension` + - ``haptics/hjif`` for ``.hjif`` extension + - ``haptics/hmpg`` for ``.hmpg`` extension + + (Contributed by Charlie Lin in :gh:`145918`.) + * Rename ``application/x-texinfo`` to ``application/texinfo``. (Contributed by Charlie Lin in :gh:`140165`.) * Changed the MIME type for ``.ai`` files to ``application/pdf``. From 28d20235140259173a5cdcdf5489bcb0232fba13 Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Fri, 13 Mar 2026 10:30:55 -0400 Subject: [PATCH 4/8] Fix typo in haptics/ivs extension description --- Doc/whatsnew/3.15.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 0db80967fa86cf..2236d8524a12a8 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -839,7 +839,7 @@ mimetypes * Add the following: - ``font/collection`` for ``.ttc`` extension - - ``haptics/ivs`` for ``.ivs` extension` + - ``haptics/ivs`` for ``.ivs`` extension - ``haptics/hjif`` for ``.hjif`` extension - ``haptics/hmpg`` for ``.hmpg`` extension From e9e1cfdcc6c29e53ff489ab8dd53670353f87e1b Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Wed, 1 Apr 2026 19:29:39 -0400 Subject: [PATCH 5/8] Update Lib/mimetypes.py Co-authored-by: Benedikt Johannes --- Lib/mimetypes.py | 1 - 1 file changed, 1 deletion(-) diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index 5639ba858ee2da..c94f4eb067b408 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -604,7 +604,6 @@ def _default_mime_types(): '.ttf' : 'font/ttf', '.woff' : 'font/woff', '.woff2' : 'font/woff2', - '.ivs' : 'haptics/ivs', '.hjif' : 'haptics/hjif', '.hmpg' : 'haptics/hmpg', '.avif' : 'image/avif', From a0ea39cab3342cd698773fdd3275fa2e0ccb671b Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Wed, 1 Apr 2026 19:29:49 -0400 Subject: [PATCH 6/8] Update Lib/mimetypes.py Co-authored-by: Benedikt Johannes --- Lib/mimetypes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index c94f4eb067b408..ad18db09f6b340 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -606,6 +606,7 @@ def _default_mime_types(): '.woff2' : 'font/woff2', '.hjif' : 'haptics/hjif', '.hmpg' : 'haptics/hmpg', + '.ivs' : 'haptics/ivs', '.avif' : 'image/avif', '.bmp' : 'image/bmp', '.emf' : 'image/emf', From 3f128eeb72ee0b92f24f2e57c16b92039b6ea5ba Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Wed, 1 Apr 2026 19:30:45 -0400 Subject: [PATCH 7/8] Update mimetypes with new entries Added new mimetypes for font and haptics. --- .../Library/2026-03-13-14-23-33.gh-issue-145917.TooGKx.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2026-03-13-14-23-33.gh-issue-145917.TooGKx.rst b/Misc/NEWS.d/next/Library/2026-03-13-14-23-33.gh-issue-145917.TooGKx.rst index b35743598c5af9..06a57fe9e72ae2 100644 --- a/Misc/NEWS.d/next/Library/2026-03-13-14-23-33.gh-issue-145917.TooGKx.rst +++ b/Misc/NEWS.d/next/Library/2026-03-13-14-23-33.gh-issue-145917.TooGKx.rst @@ -3,4 +3,6 @@ Add the following to ``mimetypes``: * ``font/collection`` * ``haptics/ivs`` * ``haptics/hjif`` -* ``haptics/hmpg`` +* ``haptics/hmpg`` + +(Contributed by Charlie Lin in :gh:`145918`.) From aaaad5f00623bfabcf0f9b4a3a5eeb2b0946303f Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Wed, 1 Apr 2026 19:51:02 -0400 Subject: [PATCH 8/8] Format mimetypes list for consistency --- .../2026-03-13-14-23-33.gh-issue-145917.TooGKx.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Misc/NEWS.d/next/Library/2026-03-13-14-23-33.gh-issue-145917.TooGKx.rst b/Misc/NEWS.d/next/Library/2026-03-13-14-23-33.gh-issue-145917.TooGKx.rst index 06a57fe9e72ae2..d40c6bdec90fe9 100644 --- a/Misc/NEWS.d/next/Library/2026-03-13-14-23-33.gh-issue-145917.TooGKx.rst +++ b/Misc/NEWS.d/next/Library/2026-03-13-14-23-33.gh-issue-145917.TooGKx.rst @@ -1,8 +1,8 @@ Add the following to ``mimetypes``: -* ``font/collection`` -* ``haptics/ivs`` -* ``haptics/hjif`` -* ``haptics/hmpg`` + - ``font/collection`` + - ``haptics/ivs`` + - ``haptics/hjif`` + - ``haptics/hmpg`` (Contributed by Charlie Lin in :gh:`145918`.)