[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

S Arrowsmith report at bugs.python.org
Mon Jun 28 20:45:22 CEST 2010


S Arrowsmith <siona at chiark.greenend.org.uk> added the comment:

I've dug into it -- again -- and my original analysis still holds. Getting consistent guess_extension() results across an explicit init() call depends on dict.items() returning keys in the same order on two different dictionaries (the original, hard-coded types_map and the one created by the first, implicit init() call).

Why should this be different on Debian to other Linuxes, even given same data as a "working" distribution? Is there something in the implementation details of dict.items() which is that distribution dependent?

(A "fix", BTW, is to insert a call to _default_mime_types() either in init() or in MimeTypes.__init__ before it calls init().)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4963>
_______________________________________


More information about the Python-bugs-list mailing list