[Python-checkins] bpo-42158: Add MIME types for n-triples, n-quads, n3 and trig (GH-23230)

ambv webhook-mailer at python.org
Sat Nov 20 10:52:08 EST 2021


https://github.com/python/cpython/commit/ef5305819ff9b283d92dbf004f977592f4e64165
commit: ef5305819ff9b283d92dbf004f977592f4e64165
branch: main
author: Dylan Van Assche <me at dylanvanassche.be>
committer: ambv <lukasz at langa.pl>
date: 2021-11-20T16:52:00+01:00
summary:

bpo-42158: Add MIME types for n-triples, n-quads, n3 and trig (GH-23230)

Co-authored-by: Éric Araujo <merwok at netwok.org>

files:
A Misc/NEWS.d/next/Library/2020-11-10-17-46-12.bpo-42158.OhxAiH.rst
M Lib/mimetypes.py

diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py
index e14d0719bed48..4750408173ec0 100644
--- a/Lib/mimetypes.py
+++ b/Lib/mimetypes.py
@@ -436,6 +436,8 @@ def _default_mime_types():
         '.doc'    : 'application/msword',
         '.dot'    : 'application/msword',
         '.wiz'    : 'application/msword',
+        '.nq'     : 'application/n-quads',
+        '.nt'     : 'application/n-triples',
         '.bin'    : 'application/octet-stream',
         '.a'      : 'application/octet-stream',
         '.dll'    : 'application/octet-stream',
@@ -449,6 +451,7 @@ def _default_mime_types():
         '.ps'     : 'application/postscript',
         '.ai'     : 'application/postscript',
         '.eps'    : 'application/postscript',
+        '.trig'   : 'application/trig',
         '.m3u'    : 'application/vnd.apple.mpegurl',
         '.m3u8'   : 'application/vnd.apple.mpegurl',
         '.xls'    : 'application/vnd.ms-excel',
@@ -546,6 +549,7 @@ def _default_mime_types():
         '.csv'    : 'text/csv',
         '.html'   : 'text/html',
         '.htm'    : 'text/html',
+        '.n3'     : 'text/n3',
         '.txt'    : 'text/plain',
         '.bat'    : 'text/plain',
         '.c'      : 'text/plain',
diff --git a/Misc/NEWS.d/next/Library/2020-11-10-17-46-12.bpo-42158.OhxAiH.rst b/Misc/NEWS.d/next/Library/2020-11-10-17-46-12.bpo-42158.OhxAiH.rst
new file mode 100644
index 0000000000000..a71b481219e80
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2020-11-10-17-46-12.bpo-42158.OhxAiH.rst
@@ -0,0 +1 @@
+Add MIME types for N-quads, N-triples, Notation3 and TriG to ``mimetypes``.



More information about the Python-checkins mailing list