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.

Author xpdseth
Recipients xpdseth
Date 2020-10-13.21:15:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1602623702.59.0.922962266093.issue42028@roundup.psfhosted.org>
In-reply-to
Content
Please check the following short examples of the issue:

Status: Downloaded newer image for python:3.7.4
Python 3.7.4 (default, Oct 17 2019, 05:59:21)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mimetypes
>>> str(mimetypes.guess_extension('image/bmp'))
'.bmp'


Status: Downloaded newer image for python:3.7.5
Python 3.7.5 (default, Nov 23 2019, 05:59:34)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mimetypes
>>> str(mimetypes.guess_extension('image/bmp'))
'None'
>>>

Status: Downloaded newer image for python:latest
Python 3.9.0 (default, Oct  6 2020, 21:52:53)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mimetypes
>>> str(mimetypes.guess_extension('image/bmp'))
'None'


I believe the issue is introduced here by duplicating the bmp key in types_map/_types_map_default

'.bmp'    : 'image/bmp'
https://github.com/python/cpython/pull/14375/files#diff-aed43839a49bace08b60186baa4b27ad69ecd6b61f928bd696b4fb670750774fR490

 '.bmp'    : 'image/x-ms-bmp',
https://github.com/python/cpython/pull/14375/files#diff-aed43839a49bace08b60186baa4b27ad69ecd6b61f928bd696b4fb670750774fR502
History
Date User Action Args
2020-10-13 21:15:02xpdsethsetrecipients: + xpdseth
2020-10-13 21:15:02xpdsethsetmessageid: <1602623702.59.0.922962266093.issue42028@roundup.psfhosted.org>
2020-10-13 21:15:02xpdsethlinkissue42028 messages
2020-10-13 21:15:02xpdsethcreate