From 010d44fd76cd00eb9eb2ab41b842219a7e066762 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Sat, 8 Nov 2025 13:03:30 +0000 Subject: [PATCH 1/3] Commit --- Lib/mimetypes.py | 2 +- .../next/Library/2025-11-08-13-03-10.gh-issue-87710.XJeZlP.rst | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Library/2025-11-08-13-03-10.gh-issue-87710.XJeZlP.rst diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index 48a9f430d45262..9661d42394242f 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -495,10 +495,10 @@ def _default_mime_types(): '.so' : 'application/octet-stream', '.oda' : 'application/oda', '.ogx' : 'application/ogg', + '.ai' : 'application/pdf', '.pdf' : 'application/pdf', '.p7c' : 'application/pkcs7-mime', '.ps' : 'application/postscript', - '.ai' : 'application/postscript', '.eps' : 'application/postscript', '.texi' : 'application/texinfo', '.texinfo': 'application/texinfo', 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``. From 19a83fb8473cbd24386559d92c236b6dca3bb56a Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Mon, 10 Nov 2025 19:29:43 +0000 Subject: [PATCH 2/3] review --- Lib/mimetypes.py | 2 +- Lib/test/test_mimetypes.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index 9661d42394242f..b0d4591302a586 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -495,8 +495,8 @@ def _default_mime_types(): '.so' : 'application/octet-stream', '.oda' : 'application/oda', '.ogx' : 'application/ogg', - '.ai' : 'application/pdf', '.pdf' : 'application/pdf', + '.ai' : 'application/pdf', '.p7c' : 'application/pkcs7-mime', '.ps' : 'application/postscript', '.eps' : 'application/postscript', 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"), From b45d8f45fba6bc130d4ef62b709da3bf1ab710cd Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Tue, 11 Nov 2025 16:44:19 +0000 Subject: [PATCH 3/3] What's New --- Doc/whatsnew/3.15.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 5379ac3abba227..5ed3ff874680f2 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -445,7 +445,9 @@ mimetypes * 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