Author dhess
Recipients a.badger, barry, dhess, l0nwlf, pitrou, r.david.murray, siona, sivert, terry.reedy, wichert, wodny
Date 2017-05-08.19:35:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1494272157.53.0.878596838926.issue4963@psf.upfronthosting.co.za>
In-reply-to
Content
And the underlying problem causing this:

$ python -c 'import mimetypes;print(mimetypes.guess_all_extensions("image/jpeg"))'
['.jpeg', '.jpg', '.jpe']
$ python -c 'import mimetypes;print(mimetypes.guess_all_extensions("image/jpeg"))'
['.jpg', '.jpe', '.jpeg']
$ python -c 'import mimetypes;print(mimetypes.guess_all_extensions("image/jpeg"))'
['.jpg', '.jpeg', '.jpe']
$ python -c 'import mimetypes;print(mimetypes.guess_all_extensions("image/jpeg"))'
['.jpe', '.jpg', '.jpeg']
$ python -c 'import mimetypes;print(mimetypes.guess_all_extensions("image/jpeg"))'
['.jpeg', '.jpg', '.jpe']
$ 

If the module can't know which extension is preferred, perhaps guess_extension should just be deprecated and the results of guess_all_extensions sorted on return?

At least that would give us some determinism to work with.
History
Date User Action Args
2017-05-08 19:35:57dhesssetrecipients: + dhess, barry, terry.reedy, pitrou, wichert, a.badger, r.david.murray, siona, l0nwlf, wodny, sivert
2017-05-08 19:35:57dhesssetmessageid: <1494272157.53.0.878596838926.issue4963@psf.upfronthosting.co.za>
2017-05-08 19:35:57dhesslinkissue4963 messages
2017-05-08 19:35:57dhesscreate