From 2e44a0812b3bf73169ea512ccfef43ce6528709a Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Mon, 9 Mar 2026 14:24:08 -0400 Subject: [PATCH 1/6] Add SQL and SQLite3 MIME types to test_mimetypes.py --- Lib/test/test_mimetypes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_mimetypes.py b/Lib/test/test_mimetypes.py index fe7584f1f9d3b3..c8c91468c59950 100644 --- a/Lib/test/test_mimetypes.py +++ b/Lib/test/test_mimetypes.py @@ -232,6 +232,7 @@ def check_extensions(): ("application/pdf", ".pdf"), ("application/postscript", ".ps"), ("application/rtf", ".rtf"), + ("application/sql", ".sql"), ("application/texinfo", ".texi"), ("application/toml", ".toml"), ("application/vnd.apple.mpegurl", ".m3u"), @@ -246,6 +247,7 @@ def check_extensions(): ("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", ".xlsx"), ("application/vnd.openxmlformats-officedocument.wordprocessingml.document", ".docx"), ("application/vnd.rar", ".rar"), + ("application/vnd.sqlite3", ".sqlite3") ("application/x-7z-compressed", ".7z"), ("application/x-debian-package", ".deb"), ("application/x-httpd-php", ".php"), From c6597df6ee7ddd23bc4302180af3b9b6c9741fb0 Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Mon, 9 Mar 2026 14:26:34 -0400 Subject: [PATCH 2/6] Add SQL and SQLite MIME types --- Lib/mimetypes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index fc916c470a0110..ee66160be63b6f 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -501,6 +501,7 @@ def _default_mime_types(): '.ps' : 'application/postscript', '.eps' : 'application/postscript', '.rtf' : 'application/rtf', + '.sql' : 'application/sql', '.texi' : 'application/texinfo', '.texinfo': 'application/texinfo', '.toml' : 'application/toml', @@ -525,6 +526,8 @@ def _default_mime_types(): '.xlsx' : 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', '.docx' : 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', '.rar' : 'application/vnd.rar', + '.sqlite3': 'application/vnd.sqlite3', + '.sqlite' : 'application/vnd.sqlite3', '.wasm' : 'application/wasm', '.7z' : 'application/x-7z-compressed', '.bcpio' : 'application/x-bcpio', From 9f316a8720239c1659b3201e4519f702d967f36c Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Mon, 9 Mar 2026 14:31:46 -0400 Subject: [PATCH 3/6] Add application/sql and application/vnd.sqlite3 MIME types Added new MIME types for SQL and SQLite3. --- Doc/whatsnew/3.15.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/whatsnew/3.15.rst b/Doc/whatsnew/3.15.rst index 42b6171c1a83a2..29cf3e93a18851 100644 --- a/Doc/whatsnew/3.15.rst +++ b/Doc/whatsnew/3.15.rst @@ -822,6 +822,8 @@ 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`.) +* Add ``application/sql`` and ``application/vnd.sqlite3``. + (Contributed by Charlie Lin in :gh:`145698`.) * Add ``image/jxl``. (Contributed by Foolbar in :gh:`144213`.) * Rename ``application/x-texinfo`` to ``application/texinfo``. (Contributed by Charlie Lin in :gh:`140165`.) From 6ddd725beb4a034c1c44c9be01d5da4231ea2646 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Mon, 9 Mar 2026 18:33:19 +0000 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Library/2026-03-09-18-33-16.gh-issue-145697.d6hFmm.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Library/2026-03-09-18-33-16.gh-issue-145697.d6hFmm.rst diff --git a/Misc/NEWS.d/next/Library/2026-03-09-18-33-16.gh-issue-145697.d6hFmm.rst b/Misc/NEWS.d/next/Library/2026-03-09-18-33-16.gh-issue-145697.d6hFmm.rst new file mode 100644 index 00000000000000..15f4fc56e161fd --- /dev/null +++ b/Misc/NEWS.d/next/Library/2026-03-09-18-33-16.gh-issue-145697.d6hFmm.rst @@ -0,0 +1 @@ +Add ``application/sql`` and ``application/vnd.sqlite3`` into ``mimetypes`` From c716605d83ca3f44fe8cf4353e52defca6a7367d Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Mon, 9 Mar 2026 14:45:38 -0400 Subject: [PATCH 5/6] Add missing comma Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> --- Lib/test/test_mimetypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_mimetypes.py b/Lib/test/test_mimetypes.py index c8c91468c59950..2d618081521e10 100644 --- a/Lib/test/test_mimetypes.py +++ b/Lib/test/test_mimetypes.py @@ -247,7 +247,7 @@ def check_extensions(): ("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", ".xlsx"), ("application/vnd.openxmlformats-officedocument.wordprocessingml.document", ".docx"), ("application/vnd.rar", ".rar"), - ("application/vnd.sqlite3", ".sqlite3") + ("application/vnd.sqlite3", ".sqlite3"), ("application/x-7z-compressed", ".7z"), ("application/x-debian-package", ".deb"), ("application/x-httpd-php", ".php"), From 1393bec346f4c1df6e3aaedbc208799c55f97fce Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Mon, 9 Mar 2026 15:58:26 -0400 Subject: [PATCH 6/6] Update Misc/NEWS.d/next/Library/2026-03-09-18-33-16.gh-issue-145697.d6hFmm.rst Co-authored-by: Benedikt Johannes --- .../next/Library/2026-03-09-18-33-16.gh-issue-145697.d6hFmm.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2026-03-09-18-33-16.gh-issue-145697.d6hFmm.rst b/Misc/NEWS.d/next/Library/2026-03-09-18-33-16.gh-issue-145697.d6hFmm.rst index 15f4fc56e161fd..c3a476df75f136 100644 --- a/Misc/NEWS.d/next/Library/2026-03-09-18-33-16.gh-issue-145697.d6hFmm.rst +++ b/Misc/NEWS.d/next/Library/2026-03-09-18-33-16.gh-issue-145697.d6hFmm.rst @@ -1 +1 @@ -Add ``application/sql`` and ``application/vnd.sqlite3`` into ``mimetypes`` +Add ``application/sql`` and ``application/vnd.sqlite3`` into ``mimetypes``.