]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-144212: Add `image/jxl` to `mimetypes` (GH-144213)
authorFooIbar <118464521+FooIbar@users.noreply.github.com>
Mon, 26 Jan 2026 14:26:55 +0000 (22:26 +0800)
committerGitHub <noreply@github.com>
Mon, 26 Jan 2026 14:26:55 +0000 (15:26 +0100)
Doc/whatsnew/3.15.rst
Lib/mimetypes.py
Lib/test/test_mimetypes.py
Misc/NEWS.d/next/Library/2026-01-24-23-11-17.gh-issue-144212.IXqVL8.rst [new file with mode: 0644]

index c412f48606c045d3b2af7c48eb43085cb16faa7f..aec6b1ceea37cf135ff2342da224971644b52153 100644 (file)
@@ -606,6 +606,7 @@ mimetypes
 * Add ``application/dicom`` MIME type for ``.dcm`` extension. (Contributed by Benedikt Johannes in :gh:`144217`.)
 * Add ``application/node`` MIME type for ``.cjs`` extension. (Contributed by John Franey in :gh:`140937`.)
 * Add ``application/toml``. (Contributed by Gil Forcada in :gh:`139959`.)
+* Add ``image/jxl``. (Contributed by Foolbar in :gh:`144213`.)
 * 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 361f924b55da1e5b8e6d60049974a814ae98c549..fc916c470a011047f64a7ca68b757cdb15370e38 100644 (file)
@@ -609,6 +609,7 @@ def _default_mime_types():
         '.jpeg'   : 'image/jpeg',
         '.jpm'    : 'image/jpm',
         '.jpx'    : 'image/jpx',
+        '.jxl'    : 'image/jxl',
         '.heic'   : 'image/heic',
         '.heif'   : 'image/heif',
         '.png'    : 'image/png',
index 32adc59359108faabf404511b308b60626d7656b..fe7584f1f9d3b32b08c44944a218f92e10fa3fdd 100644 (file)
@@ -271,6 +271,7 @@ class MimeTypesTestCase(unittest.TestCase):
                 ("image/jp2", ".jp2"),
                 ("image/jpeg", ".jpg"),
                 ("image/jpm", ".jpm"),
+                ("image/jxl", ".jxl"),
                 ("image/t38", ".t38"),
                 ("image/tiff", ".tiff"),
                 ("image/tiff-fx", ".tfx"),
diff --git a/Misc/NEWS.d/next/Library/2026-01-24-23-11-17.gh-issue-144212.IXqVL8.rst b/Misc/NEWS.d/next/Library/2026-01-24-23-11-17.gh-issue-144212.IXqVL8.rst
new file mode 100644 (file)
index 0000000..be77fb3
--- /dev/null
@@ -0,0 +1 @@
+Mime type ``image/jxl`` is now supported by :mod:`mimetypes`.