https://github.com/python/cpython/commit/88aeff8eabefdc13b6fb29edb3cde618f743a034
commit: 88aeff8eabefdc13b6fb29edb3cde618f743a034
branch: main
author: Stan Ulbrych <[email protected]>
committer: hugovk <[email protected]>
date: 2025-11-12T16:22:01+02:00
summary:

gh-87710: Update mime type for ``.ai`` (#141239)

files:
A Misc/NEWS.d/next/Library/2025-11-08-13-03-10.gh-issue-87710.XJeZlP.rst
M Doc/whatsnew/3.15.rst
M Lib/mimetypes.py
M Lib/test/test_mimetypes.py

diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst
index f0fd49c9033bc1..c6089f63dee2cb 100644
--- a/Doc/whatsnew/3.15.rst
+++ b/Doc/whatsnew/3.15.rst
@@ -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
diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py
index d6896fc4042cb4..42477713c78418 100644
--- a/Lib/mimetypes.py
+++ b/Lib/mimetypes.py
@@ -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',
diff --git a/Lib/test/test_mimetypes.py b/Lib/test/test_mimetypes.py
index 746984ec0ca9df..734144983591b4 100644
--- a/Lib/test/test_mimetypes.py
+++ b/Lib/test/test_mimetypes.py
@@ -229,6 +229,7 @@ def check_extensions():
                 ("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
index 00000000000000..62073280e32b81
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2025-11-08-13-03-10.gh-issue-87710.XJeZlP.rst
@@ -0,0 +1 @@
+:mod:`mimetypes`: Update mime type for ``.ai`` files to ``application/pdf``.

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to