summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMARK SCHWAB <32745414+schwabm@users.noreply.github.com>2020-06-11 19:04:13 (GMT)
committerGitHub <noreply@github.com>2020-06-11 19:04:13 (GMT)
commit60c2a810e37994fc640c58d0ef45b6843354b770 (patch)
treee6f69450329baa391c2ec393aead0734aa8214d2
parent46398fba4d66ad342cf2504ef947b5fb857423b2 (diff)
downloadcpython-60c2a810e37994fc640c58d0ef45b6843354b770.zip
cpython-60c2a810e37994fc640c58d0ef45b6843354b770.tar.gz
cpython-60c2a810e37994fc640c58d0ef45b6843354b770.tar.bz2
bpo-40626: Support HDF5 in mimetypes (GH-20042)
Add hdf5 with .h5 file extension See 'Recommendations' section for mime types from the HDF group: https://www.hdfgroup.org/2018/06/citations-for-hdf-data-and-software/ Patch by Mark Schwab.
-rw-r--r--Lib/mimetypes.py1
-rw-r--r--Misc/NEWS.d/next/Library/2020-05-18-17-29-30.bpo-40626.NeZufF.rst1
2 files changed, 2 insertions, 0 deletions
diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py
index e972ca2..61bfff1 100644
--- a/Lib/mimetypes.py
+++ b/Lib/mimetypes.py
@@ -448,6 +448,7 @@ def _default_mime_types():
'.dvi' : 'application/x-dvi',
'.gtar' : 'application/x-gtar',
'.hdf' : 'application/x-hdf',
+ '.h5' : 'application/x-hdf5',
'.latex' : 'application/x-latex',
'.mif' : 'application/x-mif',
'.cdf' : 'application/x-netcdf',
diff --git a/Misc/NEWS.d/next/Library/2020-05-18-17-29-30.bpo-40626.NeZufF.rst b/Misc/NEWS.d/next/Library/2020-05-18-17-29-30.bpo-40626.NeZufF.rst
new file mode 100644
index 0000000..fe652cd
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2020-05-18-17-29-30.bpo-40626.NeZufF.rst
@@ -0,0 +1 @@
+Add h5 file extension as MIME Type application/x-hdf5, as per HDF Group recommendation for HDF5 formatted data files. Patch contributed by Mark Schwab.