[Python-checkins] bpo-40626: Support HDF5 in mimetypes (GH-20042)

Miss Islington (bot) webhook-mailer at python.org
Thu Jun 11 15:32:47 EDT 2020


https://github.com/python/cpython/commit/a3d6d23a923d62a713b9e4536d5f7ce7313d99c7
commit: a3d6d23a923d62a713b9e4536d5f7ce7313d99c7
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2020-06-11T12:32:37-07:00
summary:

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.
(cherry picked from commit 60c2a810e37994fc640c58d0ef45b6843354b770)

Co-authored-by: MARK SCHWAB <32745414+schwabm at users.noreply.github.com>

files:
A Misc/NEWS.d/next/Library/2020-05-18-17-29-30.bpo-40626.NeZufF.rst
M Lib/mimetypes.py

diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py
index f33b658f10e5e..434f5b37c5821 100644
--- a/Lib/mimetypes.py
+++ b/Lib/mimetypes.py
@@ -447,6 +447,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 0000000000000..fe652cd7ee39d
--- /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.



More information about the Python-checkins mailing list