[issue4963] mimetypes.guess_extension result changes after mimetypes.init()
Wichert Akkerman
report at bugs.python.org
Thu Mar 27 13:40:07 CET 2014
Wichert Akkerman added the comment:
I can reproduce this on Both OSX 10.9 and Ubuntu 12.04:
>>> import mimetypes
>>> mimetypes.guess_extension('image/jpeg')
'.jpe'
>>> mimetypes.init()
>>> mimetypes.guess_extension('image/jpeg')
'.jpeg'
The same thing happens for Python 3.4:
Python 3.4.0rc3 (default, Mar 13 2014, 10:48:59)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import mimetypes
>>> mimetypes.guess_all_extensions('image/jpeg')
['.jpg', '.jpeg', '.jpe']
>>> mimetypes.init()
>>> mimetypes.guess_all_extensions('image/jpeg')
['.jpeg', '.jpe', '.jpg']
This also looks related to Issue1043134
----------
nosy: +wichert
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4963>
_______________________________________
More information about the Python-bugs-list
mailing list