Author dhess
Recipients a.badger, barry, dhess, l0nwlf, pitrou, r.david.murray, siona, sivert, terry.reedy, wichert, wodny
Date 2017-05-08.19:15:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1494270923.69.0.965088456423.issue4963@psf.upfronthosting.co.za>
In-reply-to
Content
Concur with @sivert – the result of guess_extension() is non-deterministic between mimetypes module initialization.

$ python
Python 3.4.3 (default, Nov 17 2016, 01:08:31) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
$ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))'
.jpe
$ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))'
.jpe
$ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))'
.jpe
$ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))'
.jpeg
$ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))'
.jpeg
$ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))'
.jpe
$ python -c 'import mimetypes;print(mimetypes.guess_extension("image/jpeg"))'
.jpg
$
History
Date User Action Args
2017-05-08 19:15:23dhesssetrecipients: + dhess, barry, terry.reedy, pitrou, wichert, a.badger, r.david.murray, siona, l0nwlf, wodny, sivert
2017-05-08 19:15:23dhesssetmessageid: <1494270923.69.0.965088456423.issue4963@psf.upfronthosting.co.za>
2017-05-08 19:15:23dhesslinkissue4963 messages
2017-05-08 19:15:23dhesscreate