This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Duplicated keys in MIME type_map with different values
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Mark.Shannon, asvetlov, cryvate
Priority: normal Keywords: patch

Created on 2017-10-25 10:14 by Mark.Shannon, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 4388 merged Cryvate, 2017-11-13 21:18
Messages (5)
msg304973 - (view) Author: Mark Shannon (Mark.Shannon) * (Python committer) Date: 2017-10-25 10:14
Here
https://github.com/python/cpython/blob/master/Lib/mimetypes.py#L416
and here
https://github.com/python/cpython/blob/master/Lib/mimetypes.py#L526

I have no idea which is the correct value for either, but the code is misleading at best.
msg304974 - (view) Author: Mark Shannon (Mark.Shannon) * (Python committer) Date: 2017-10-25 10:16
I hadn't noticed the comments on the lines above saying "Duplicates :(", so I'm obviously not the first to notice.
msg304979 - (view) Author: Henk-Jaap Wagenaar (cryvate) * Date: 2017-10-25 11:57
So for excel, 'application/excel' is not listed at http://www.iana.org/assignments/media-types as suggested by the comment at:
https://github.com/python/cpython/blob/master/Lib/mimetypes.py#L397
whereas 'applicaton/vnd.ms-excel' is listed. See also
https://stackoverflow.com/questions/974079/setting-mime-type-for-excel-document.

For cdf, Wolframalpha is using application/cdf it seems (without it being registered) whereas NetCDF suggests application/x-netcdf so that seems reasonable (and is the current value).

For context, these duplicates were introduced here:
https://github.com/python/cpython/commit/a3689fe78675c89d5979c0c5acdb1c173cc75ed6
and noted first here:
https://github.com/python/cpython/commit/107771a228ee73b4683242cb696e3024f93b74d5
msg306425 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2017-11-17 10:10
New changeset f02f5e5c3eb815fff9578dc58de60374c6baaa3d by Andrew Svetlov (Henk-Jaap Wagenaar) in branch 'master':
bpo-31867: Remove duplicates in default mimetypes. (#4388)
https://github.com/python/cpython/commit/f02f5e5c3eb815fff9578dc58de60374c6baaa3d
msg306426 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2017-11-17 10:11
Henk-Jaap thanks for contribution!
History
Date User Action Args
2022-04-11 14:58:53adminsetgithub: 76048
2017-11-17 10:11:03asvetlovsetstatus: open -> closed
resolution: fixed
messages: + msg306426

stage: patch review -> resolved
2017-11-17 10:10:22asvetlovsetnosy: + asvetlov
messages: + msg306425
2017-11-13 21:18:51Cryvatesetkeywords: + patch
stage: patch review
pull_requests: + pull_request4337
2017-10-25 11:57:12cryvatesetnosy: + cryvate

messages: + msg304979
title: Duplicated keys, but with different values in dictionary literals -> Duplicated keys in MIME type_map with different values
2017-10-25 10:16:08Mark.Shannonsetmessages: + msg304974
2017-10-25 10:14:00Mark.Shannoncreate