]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-87710: Update mime type for ``.ai`` (#141239)
authorStan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Wed, 12 Nov 2025 14:22:01 +0000 (14:22 +0000)
committerGitHub <noreply@github.com>
Wed, 12 Nov 2025 14:22:01 +0000 (16:22 +0200)
Doc/whatsnew/3.15.rst
Lib/mimetypes.py
Lib/test/test_mimetypes.py
Misc/NEWS.d/next/Library/2025-11-08-13-03-10.gh-issue-87710.XJeZlP.rst [new file with mode: 0644]

index f0fd49c9033bc15541e2c29ea1379e737dbadeaf..c6089f63dee2cbd14d7684087502c4199e345f64 100644 (file)
@@ -472,7 +472,9 @@ mimetypes
 * 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`.)
 * Rename ``application/x-texinfo`` to ``application/texinfo``.
-  (Contributed by Charlie Lin in :gh:`140165`)
+  (Contributed by Charlie Lin in :gh:`140165`.)
+* Changed the MIME type for ``.ai`` files to ``application/pdf``.
+  (Contributed by Stan Ulbrych in :gh:`141239`.)
 
 
 mmap
index d6896fc4042cb4cde7896ff96adef5b2dc0772da..42477713c7841877a0957d6dbb75e6319aefaf53 100644 (file)
@@ -497,9 +497,9 @@ def _default_mime_types():
         '.oda'    : 'application/oda',
         '.ogx'    : 'application/ogg',
         '.pdf'    : 'application/pdf',
+        '.ai'     : 'application/pdf',
         '.p7c'    : 'application/pkcs7-mime',
         '.ps'     : 'application/postscript',
-        '.ai'     : 'application/postscript',
         '.eps'    : 'application/postscript',
         '.texi'   : 'application/texinfo',
         '.texinfo': 'application/texinfo',
index 746984ec0ca9dfc58ec593554023027566cf76d9..734144983591b4f4b3f9072cba2f5f7d75f8de13 100644 (file)
@@ -229,6 +229,7 @@ class MimeTypesTestCase(unittest.TestCase):
                 ("application/octet-stream", ".bin"),
                 ("application/gzip", ".gz"),
                 ("application/ogg", ".ogx"),
+                ("application/pdf", ".pdf"),
                 ("application/postscript", ".ps"),
                 ("application/texinfo", ".texi"),
                 ("application/toml", ".toml"),
diff --git a/Misc/NEWS.d/next/Library/2025-11-08-13-03-10.gh-issue-87710.XJeZlP.rst b/Misc/NEWS.d/next/Library/2025-11-08-13-03-10.gh-issue-87710.XJeZlP.rst
new file mode 100644 (file)
index 0000000..6207328
--- /dev/null
@@ -0,0 +1 @@
+:mod:`mimetypes`: Update mime type for ``.ai`` files to ``application/pdf``.