[issue41791] mimetypes module does not recognize jp2 type

2022-01-18 Thread Andrés Delfino
Change by Andrés Delfino : -- nosy: -adelfino ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41791] mimetypes module does not recognize jp2 type

2022-01-18 Thread Irit Katriel
Irit Katriel added the comment: It is found by the module-level guess_type but not by the MimeType class's guess_type: >>> from mimetypes import MimeTypes >>> MimeTypes().guess_type('test.jp2') (None, None) >>> mimetypes.guess_type('test.jp2') ('image/jp2', None) >>> That difference is the

[issue41791] mimetypes module does not recognize jp2 type

2020-09-18 Thread Andrés Delfino
Andrés Delfino added the comment: Nice debugging! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41791] mimetypes module does not recognize jp2 type

2020-09-17 Thread Radim Novotny
Radim Novotny added the comment: Hi Andrés, tried again and the difference is between 3.7.4 and 3.7.5 The jp2 mimetype is read from /etc/apache2/mime.types (see knownfiles in mimetypes.py) so the mime type does not have to be in the mimetypes.py hardcoded, but in version 3.7.5 it stopped

[issue41791] mimetypes module does not recognize jp2 type

2020-09-17 Thread Andrés Delfino
Andrés Delfino added the comment: Hi, Radim! I've tested with 3.7.8 and got (None, None). I'm curious on how you got that 'image/jp2' output. It seems jp2 was never supported by looking into the git history of Lib/mimetypes.py. Would you like to open a PR to support it? :) --

[issue41791] mimetypes module does not recognize jp2 type

2020-09-14 Thread Radim Novotny
New submission from Radim Novotny : Even if jp2 is in the official list of types https://www.iana.org/assignments/media-types/media-types.xhtml it's not recognized by the MimeTypes.guess_type: >>> from mimetypes import MimeTypes >>> MimeTypes().guess_type('test.jp2') (None, None)