]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-145717: Add a few Microsoft-specific MIME types, and synchronize between `mimetype...
authorCharlie Lin <tuug@gmx.us>
Thu, 12 Mar 2026 16:56:07 +0000 (12:56 -0400)
committerGitHub <noreply@github.com>
Thu, 12 Mar 2026 16:56:07 +0000 (18:56 +0200)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Doc/whatsnew/3.15.rst
Lib/mimetypes.py
Misc/NEWS.d/next/Library/2026-03-10-01-48-12.gh-issue-145717.dPc0Rt.rst [new file with mode: 0644]

index c979118abd0a07165b1386869a7e0df393f855bb..7daea13d31c83d08a69cd58c59cb9e5a360bac97 100644 (file)
@@ -828,6 +828,14 @@ mimetypes
 * Add ``application/sql`` and ``application/vnd.sqlite3``.
   (Contributed by Charlie Lin in :gh:`145698`.)
 * Add ``image/jxl``. (Contributed by Foolbar in :gh:`144213`.)
+* Add the following MIME types:
+
+  - ``application/vnd.ms-cab-compressed`` for ``.cab`` extension
+  - ``application/vnd.ms-htmlhelp`` for ``.chm`` extension
+  - ``application/vnd.ms-officetheme`` for ``.thmx`` extension
+
+  (Contributed by Charlie Lin in :gh:`145718`.)
+
 * Rename ``application/x-texinfo`` to ``application/texinfo``.
   (Contributed by Charlie Lin in :gh:`140165`.)
 * Changed the MIME type for ``.ai`` files to ``application/pdf``.
index ee66160be63b6f00d92ab14e3007e9d489dde02d..60e8c2be1e25049240a6fa068bb9b92f34deca5e 100644 (file)
@@ -510,9 +510,12 @@ def _default_mime_types():
         '.m3u8'   : 'application/vnd.apple.mpegurl',
         '.dll'    : 'application/vnd.microsoft.portable-executable',
         '.exe'    : 'application/vnd.microsoft.portable-executable',
+        '.cab'    : 'application/vnd.ms-cab-compressed',
         '.xls'    : 'application/vnd.ms-excel',
         '.xlb'    : 'application/vnd.ms-excel',
         '.eot'    : 'application/vnd.ms-fontobject',
+        '.chm'    : 'application/vnd.ms-htmlhelp',
+        '.thmx'   : 'application/vnd.ms-officetheme',
         '.ppt'    : 'application/vnd.ms-powerpoint',
         '.pot'    : 'application/vnd.ms-powerpoint',
         '.ppa'    : 'application/vnd.ms-powerpoint',
diff --git a/Misc/NEWS.d/next/Library/2026-03-10-01-48-12.gh-issue-145717.dPc0Rt.rst b/Misc/NEWS.d/next/Library/2026-03-10-01-48-12.gh-issue-145717.dPc0Rt.rst
new file mode 100644 (file)
index 0000000..55ef520
--- /dev/null
@@ -0,0 +1 @@
+Add a few Microsoft-specific MIME types.