[issue37943] mimetypes.guess_extension() doesn’t get JPG right

Dong-hee Na report at bugs.python.org
Sat Aug 31 10:41:02 EDT 2019


Dong-hee Na <donghee.na92 at gmail.com> added the comment:

It works well on the master branch version but also the latest 3.7 branch
I think that we can close this issue for `.jpe` issue if we don't have to support "image/jpg" case.


Python 3.9.0a0 (heads/master:daa82d019c, Aug 31 2019, 23:37:00)
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import mimetypes
>>> mimetypes.guess_extension("image/jpg")
>>> mimetypes.guess_extension("image/jpeg")
'.jpg'

Python 3.7.4+ (heads/3.7:9a28400aac, Aug 31 2019, 23:34:02)
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import mimetypes
>>> mimetypes.guess_extension("image/jpg")
>>> mimetypes.guess_extension("image/jpeg")
'.jpg'

----------
nosy: +corona10, vstinner

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37943>
_______________________________________


More information about the Python-bugs-list mailing list