From 8e43863d94f8aa5e7c803ea01160ad64b1875110 Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Mon, 23 Mar 2026 16:33:25 -0400 Subject: [PATCH 1/6] Update MIME types in mimetypes.py Reorder JavaScript MIME types and added several new MIME types including cache manifest, calendar, and provenance notation. --- Lib/mimetypes.py | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index a834826114614d..f8fa1b965ac77e 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -475,10 +475,7 @@ def _default_mime_types(): # Make sure the entry with the preferred file extension for a particular mime type # appears before any others of the same mimetype. types_map = _types_map_default = { - '.js' : 'text/javascript', - '.mjs' : 'text/javascript', '.dcm' : 'application/dicom', - '.efi' : 'application/efi', '.epub' : 'application/epub+zip', '.gz' : 'application/gzip', '.json' : 'application/json', @@ -644,13 +641,25 @@ def _default_mime_types(): '.gltf' : 'model/gltf+json', '.glb' : 'model/gltf-binary', '.stl' : 'model/stl', + '.appcache' : 'text/cache-manifest', + '.manifest' : 'text/cache-manifest', + '.ics' : 'text/calendar', + '.ifb' : 'text/calendar', + '.cql' : 'text/cql', '.css' : 'text/css', '.csv' : 'text/csv', + '.csvs' : 'text/csv-schema', + '.gff3' : 'text/gff3', '.html' : 'text/html', '.htm' : 'text/html', + '.js' : 'text/javascript', + '.mjs' : 'text/javascript', + '.cnd' : 'text/jcr-cnd', '.md' : 'text/markdown', '.markdown': 'text/markdown', + '.miz' : 'text/mizar', '.n3' : 'text/n3', + '.org' : 'text/org', '.txt' : 'text/plain', '.bat' : 'text/plain', '.c' : 'text/plain', @@ -658,9 +667,24 @@ def _default_mime_types(): '.ksh' : 'text/plain', '.pl' : 'text/plain', '.srt' : 'text/plain', + '.provn' : 'text/provenance-notation', '.rtx' : 'text/richtext', + '.shaclc' : 'text/shaclc', + '.shc' : 'text/shaclc', + '.shex' : 'text/shex', + '.spdx' : 'text/spdx', '.tsv' : 'text/tab-separated-values', + '.ttl' : 'text/turtle', + '.uri' : 'text/uri-list', + '.uris' : 'text/uri-list', + '.vcard' : 'text/vcard', + '.vcf' : 'text/vcard', + '.ascii' : 'text/vnd.ascii-art', + '.curl' : 'text/vnd.curl', + '.gml' : 'text/vnd.gml', + '.gv' : 'text/vnd.graphviz', '.vtt' : 'text/vtt', + '.wgsl' : 'text/wgsl', '.py' : 'text/x-python', '.rst' : 'text/x-rst', '.etx' : 'text/x-setext', @@ -668,6 +692,7 @@ def _default_mime_types(): '.sgml' : 'text/x-sgml', '.vcf' : 'text/x-vcard', '.xml' : 'text/xml', + '.ent' : 'text/xml-external-parsed-entity', '.mkv' : 'video/matroska', '.mk3d' : 'video/matroska-3d', '.mp4' : 'video/mp4', From c06def760389d121699111754d2d6a2762e8360c Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 20:37:04 +0000 Subject: [PATCH 2/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 --- ...-03-23-20-37-02.gh-issue-146343.JnXJVB.rst | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2026-03-23-20-37-02.gh-issue-146343.JnXJVB.rst diff --git a/Misc/NEWS.d/next/Library/2026-03-23-20-37-02.gh-issue-146343.JnXJVB.rst b/Misc/NEWS.d/next/Library/2026-03-23-20-37-02.gh-issue-146343.JnXJVB.rst new file mode 100644 index 00000000000000..bc250c74988d5f --- /dev/null +++ b/Misc/NEWS.d/next/Library/2026-03-23-20-37-02.gh-issue-146343.JnXJVB.rst @@ -0,0 +1,28 @@ +Add the following MIME types with file extensions: + + '.appcache' : 'text/cache-manifest', + '.manifest' : 'text/cache-manifest', + '.ics' : 'text/calendar', + '.ifb' : 'text/calendar', + '.cql' : 'text/cql', + '.csvs' : 'text/csv-schema', + '.gff3' : 'text/gff3', + '.cnd' : 'text/jcr-cnd', +'.miz' : 'text/mizar', + '.org' : 'text/org', +'.provn' : 'text/provenance-notation', + '.shaclc' : 'text/shaclc', + '.shc' : 'text/shaclc', + '.shex' : 'text/shex', + '.spdx' : 'text/spdx', + '.ttl' : 'text/turtle', + '.uri' : 'text/uri-list', + '.uris' : 'text/uri-list', + '.vcard' : 'text/vcard', + '.vcf' : 'text/vcard', + '.ascii' : 'text/vnd.ascii-art', + '.curl' : 'text/vnd.curl', + '.gml' : 'text/vnd.gml', + '.gv' : 'text/vnd.graphviz', + '.wgsl' : 'text/wgsl', + '.ent' : 'text/xml-external-parsed-entity' From b794e7d160751016b25976bd02ee32e02bdfe930 Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Mon, 23 Mar 2026 16:40:08 -0400 Subject: [PATCH 3/6] Fix formatting of mimetype for .cnd files --- Lib/mimetypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py index f8fa1b965ac77e..aba9d6e59c08f9 100644 --- a/Lib/mimetypes.py +++ b/Lib/mimetypes.py @@ -654,7 +654,7 @@ def _default_mime_types(): '.htm' : 'text/html', '.js' : 'text/javascript', '.mjs' : 'text/javascript', - '.cnd' : 'text/jcr-cnd', + '.cnd' : 'text/jcr-cnd', '.md' : 'text/markdown', '.markdown': 'text/markdown', '.miz' : 'text/mizar', From fe97aa8631cd17509ff0ff369a330fd50d3946e0 Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Mon, 23 Mar 2026 16:42:37 -0400 Subject: [PATCH 4/6] Refactor MIME types list for clarity --- ...-03-23-20-37-02.gh-issue-146343.JnXJVB.rst | 48 +++++++++---------- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/Misc/NEWS.d/next/Library/2026-03-23-20-37-02.gh-issue-146343.JnXJVB.rst b/Misc/NEWS.d/next/Library/2026-03-23-20-37-02.gh-issue-146343.JnXJVB.rst index bc250c74988d5f..9e0439c8f9ea80 100644 --- a/Misc/NEWS.d/next/Library/2026-03-23-20-37-02.gh-issue-146343.JnXJVB.rst +++ b/Misc/NEWS.d/next/Library/2026-03-23-20-37-02.gh-issue-146343.JnXJVB.rst @@ -1,28 +1,24 @@ Add the following MIME types with file extensions: - '.appcache' : 'text/cache-manifest', - '.manifest' : 'text/cache-manifest', - '.ics' : 'text/calendar', - '.ifb' : 'text/calendar', - '.cql' : 'text/cql', - '.csvs' : 'text/csv-schema', - '.gff3' : 'text/gff3', - '.cnd' : 'text/jcr-cnd', -'.miz' : 'text/mizar', - '.org' : 'text/org', -'.provn' : 'text/provenance-notation', - '.shaclc' : 'text/shaclc', - '.shc' : 'text/shaclc', - '.shex' : 'text/shex', - '.spdx' : 'text/spdx', - '.ttl' : 'text/turtle', - '.uri' : 'text/uri-list', - '.uris' : 'text/uri-list', - '.vcard' : 'text/vcard', - '.vcf' : 'text/vcard', - '.ascii' : 'text/vnd.ascii-art', - '.curl' : 'text/vnd.curl', - '.gml' : 'text/vnd.gml', - '.gv' : 'text/vnd.graphviz', - '.wgsl' : 'text/wgsl', - '.ent' : 'text/xml-external-parsed-entity' +- '.appcache' and '.manifest' : 'text/cache-manifest', +- '.ics' and '.ifb' : 'text/calendar', +- '.cql' : 'text/cql', +- '.csvs' : 'text/csv-schema', +- '.gff3' : 'text/gff3', +- '.cnd' : 'text/jcr-cnd', +- '.miz' : 'text/mizar', +- '.org' : 'text/org', +- '.provn' : 'text/provenance-notation', +- '.shaclc' and '.shc' : 'text/shaclc', +- '.shex' : 'text/shex', +- '.spdx' : 'text/spdx', +- '.ttl' : 'text/turtle', +- '.uri' and '.uris' : 'text/uri-list', +- '.vcard' and '.vcf' : 'text/vcard', +- '.ascii' : 'text/vnd.ascii-art', +- '.curl' : 'text/vnd.curl', +- '.gml' : 'text/vnd.gml', +- '.gv' : 'text/vnd.graphviz', +- '.wgsl' : 'text/wgsl', +- '.ent' : 'text/xml-external-parsed-entity' + From 05547a08a0e116746e0404ed55e7e323187746f7 Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Mon, 23 Mar 2026 20:21:32 -0400 Subject: [PATCH 5/6] Formatting --- ...-03-23-20-37-02.gh-issue-146343.JnXJVB.rst | 43 +++++++++---------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/Misc/NEWS.d/next/Library/2026-03-23-20-37-02.gh-issue-146343.JnXJVB.rst b/Misc/NEWS.d/next/Library/2026-03-23-20-37-02.gh-issue-146343.JnXJVB.rst index 9e0439c8f9ea80..7934f138ab0e8c 100644 --- a/Misc/NEWS.d/next/Library/2026-03-23-20-37-02.gh-issue-146343.JnXJVB.rst +++ b/Misc/NEWS.d/next/Library/2026-03-23-20-37-02.gh-issue-146343.JnXJVB.rst @@ -1,24 +1,23 @@ Add the following MIME types with file extensions: -- '.appcache' and '.manifest' : 'text/cache-manifest', -- '.ics' and '.ifb' : 'text/calendar', -- '.cql' : 'text/cql', -- '.csvs' : 'text/csv-schema', -- '.gff3' : 'text/gff3', -- '.cnd' : 'text/jcr-cnd', -- '.miz' : 'text/mizar', -- '.org' : 'text/org', -- '.provn' : 'text/provenance-notation', -- '.shaclc' and '.shc' : 'text/shaclc', -- '.shex' : 'text/shex', -- '.spdx' : 'text/spdx', -- '.ttl' : 'text/turtle', -- '.uri' and '.uris' : 'text/uri-list', -- '.vcard' and '.vcf' : 'text/vcard', -- '.ascii' : 'text/vnd.ascii-art', -- '.curl' : 'text/vnd.curl', -- '.gml' : 'text/vnd.gml', -- '.gv' : 'text/vnd.graphviz', -- '.wgsl' : 'text/wgsl', -- '.ent' : 'text/xml-external-parsed-entity' - + - ``.appcache`` and ``.manifest`` : ``text/cache-manifest`` + - ``.ics`` and ``.ifb`` : ``text/calendar`` + - ``.cql`` : ``text/cql`` + - ``.csvs`` : ``text/csv-schema`` + - ``.gff3`` : ``text/gff3`` + - ``.cnd`` : ``text/jcr-cnd`` + - ``.miz`` : ``text/mizar`` + - ``.org`` : ``text/org`` + - ``.provn`` : ``text/provenance-notation`` + - ``.shaclc`` and ``.shc`` : ``text/shaclc`` + - ``.shex`` : ``text/shex`` + - ``.spdx`` : ``text/spdx`` + - ``.ttl`` : ``text/turtle`` + - ``.uri`` and ``.uris`` : ``text/uri-list`` + - ``.vcard`` and ``.vcf`` : ``text/vcard`` + - ``.ascii`` : ``text/vnd.ascii-art`` + - ``.curl`` : ``text/vnd.curl`` + - ``.gml`` : ``text/vnd.gml`` + - ``.gv`` : ``text/vnd.graphviz`` + - ``.wgsl`` : ``text/wgsl`` + - ``.ent`` : ``text/xml-external-parsed-entity`` From c06a8bbe9c4f48e0d14b2f893e519ab2e9ddedf4 Mon Sep 17 00:00:00 2001 From: Charlie Lin Date: Mon, 23 Mar 2026 21:04:52 -0400 Subject: [PATCH 6/6] Again... --- ...-03-23-20-37-02.gh-issue-146343.JnXJVB.rst | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/Misc/NEWS.d/next/Library/2026-03-23-20-37-02.gh-issue-146343.JnXJVB.rst b/Misc/NEWS.d/next/Library/2026-03-23-20-37-02.gh-issue-146343.JnXJVB.rst index 7934f138ab0e8c..6aeb5b289dff19 100644 --- a/Misc/NEWS.d/next/Library/2026-03-23-20-37-02.gh-issue-146343.JnXJVB.rst +++ b/Misc/NEWS.d/next/Library/2026-03-23-20-37-02.gh-issue-146343.JnXJVB.rst @@ -1,23 +1,23 @@ Add the following MIME types with file extensions: - - ``.appcache`` and ``.manifest`` : ``text/cache-manifest`` - - ``.ics`` and ``.ifb`` : ``text/calendar`` - - ``.cql`` : ``text/cql`` - - ``.csvs`` : ``text/csv-schema`` - - ``.gff3`` : ``text/gff3`` - - ``.cnd`` : ``text/jcr-cnd`` - - ``.miz`` : ``text/mizar`` - - ``.org`` : ``text/org`` - - ``.provn`` : ``text/provenance-notation`` - - ``.shaclc`` and ``.shc`` : ``text/shaclc`` - - ``.shex`` : ``text/shex`` - - ``.spdx`` : ``text/spdx`` - - ``.ttl`` : ``text/turtle`` - - ``.uri`` and ``.uris`` : ``text/uri-list`` - - ``.vcard`` and ``.vcf`` : ``text/vcard`` - - ``.ascii`` : ``text/vnd.ascii-art`` - - ``.curl`` : ``text/vnd.curl`` - - ``.gml`` : ``text/vnd.gml`` - - ``.gv`` : ``text/vnd.graphviz`` - - ``.wgsl`` : ``text/wgsl`` - - ``.ent`` : ``text/xml-external-parsed-entity`` + - ``.appcache`` and ``.manifest`` for ``text/cache-manifest`` + - ``.ics`` and ``.ifb`` for ``text/calendar`` + - ``.cql`` for ``text/cql`` + - ``.csvs`` for ``text/csv-schema`` + - ``.gff3`` for ``text/gff3`` + - ``.cnd`` for ``text/jcr-cnd`` + - ``.miz`` for ``text/mizar`` + - ``.org`` for ``text/org`` + - ``.provn`` for ``text/provenance-notation`` + - ``.shaclc`` and ``.shc`` for ``text/shaclc`` + - ``.shex`` for ``text/shex`` + - ``.spdx`` for ``text/spdx`` + - ``.ttl`` for ``text/turtle`` + - ``.uri`` and ``.uris`` for ``text/uri-list`` + - ``.vcard`` and ``.vcf`` for ``text/vcard`` + - ``.ascii`` for ``text/vnd.ascii-art`` + - ``.curl`` for ``text/vnd.curl`` + - ``.gml`` for ``text/vnd.gml`` + - ``.gv`` for ``text/vnd.graphviz`` + - ``.wgsl`` for ``text/wgsl`` + - ``.ent`` for ``text/xml-external-parsed-entity``