From f15c5472b70cbdff10c86d61b8b5f1ac60791d90 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Sat, 11 Oct 2025 16:19:02 +0200 Subject: [PATCH 1/4] chore(mimetypes): keep them sorted --- Lib/mimetypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index 7d0f4c1fd400d5..9cac066b6f5dc3 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -587,9 +587,9 @@ def _default_mime_types(): '.aiff' : 'audio/x-aiff', '.ra' : 'audio/x-pn-realaudio', '.wav' : 'audio/vnd.wave', + '.weba' : 'audio/webm', '.otf' : 'font/otf', '.ttf' : 'font/ttf', - '.weba' : 'audio/webm', '.woff' : 'font/woff', '.woff2' : 'font/woff2', '.avif' : 'image/avif', From 52a778f6a66c31b3b461462e799fee32b2a2d64f Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Sat, 11 Oct 2025 16:20:11 +0200 Subject: [PATCH 2/4] fix(mimetypes): add toml mimetype --- Lib/mimetypes.py | 1 + Lib/test/test_mimetypes.py | 1 + 2 files changed, 2 insertions(+) diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index 9cac066b6f5dc3..6c0efb671975d4 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -500,6 +500,7 @@ def _default_mime_types(): '.ps' : 'application/postscript', '.ai' : 'application/postscript', '.eps' : 'application/postscript', + '.toml' : 'application/toml', '.trig' : 'application/trig', '.m3u' : 'application/vnd.apple.mpegurl', '.m3u8' : 'application/vnd.apple.mpegurl', diff --git a/Lib/test/test_mimetypes.py b/Lib/test/test_mimetypes.py index c1806b1c133778..a29815bf49b1e7 100644 --- a/Lib/test/test_mimetypes.py +++ b/Lib/test/test_mimetypes.py @@ -230,6 +230,7 @@ def check_extensions(): ("application/gzip", ".gz"), ("application/ogg", ".ogx"), ("application/postscript", ".ps"), + ("application/toml", ".toml"), ("application/vnd.apple.mpegurl", ".m3u"), ("application/vnd.ms-excel", ".xls"), ("application/vnd.ms-fontobject", ".eot"), From f5c2435a68f299c7ea926868d95221129ef2fd62 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Sat, 11 Oct 2025 17:42:11 +0200 Subject: [PATCH 3/4] Add change description --- .../next/Library/2025-10-11-17-41-26.gh-issue-139958.AnCakj.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Library/2025-10-11-17-41-26.gh-issue-139958.AnCakj.rst diff --git a/Misc/NEWS.d/next/Library/2025-10-11-17-41-26.gh-issue-139958.AnCakj.rst b/Misc/NEWS.d/next/Library/2025-10-11-17-41-26.gh-issue-139958.AnCakj.rst new file mode 100644 index 00000000000000..52ac2d74019d78 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2025-10-11-17-41-26.gh-issue-139958.AnCakj.rst @@ -0,0 +1 @@ +Add MIME type for ``.toml`` files. Patch by Gil Forcada From f1086947a26619654f653986dada70a37da124d4 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Sat, 11 Oct 2025 17:57:08 +0200 Subject: [PATCH 4/4] Update Misc/NEWS.d/next/Library/2025-10-11-17-41-26.gh-issue-139958.AnCakj.rst Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> --- .../Library/2025-10-11-17-41-26.gh-issue-139958.AnCakj.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Library/2025-10-11-17-41-26.gh-issue-139958.AnCakj.rst b/Misc/NEWS.d/next/Library/2025-10-11-17-41-26.gh-issue-139958.AnCakj.rst index 52ac2d74019d78..f129f8beb241d7 100644 --- a/Misc/NEWS.d/next/Library/2025-10-11-17-41-26.gh-issue-139958.AnCakj.rst +++ b/Misc/NEWS.d/next/Library/2025-10-11-17-41-26.gh-issue-139958.AnCakj.rst @@ -1 +1,2 @@ -Add MIME type for ``.toml`` files. Patch by Gil Forcada +The ``application/toml`` mime type is now supported by :mod:`mimetypes`. +Patch by Gil Forcada.