This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: mimetypes libmagic compatibility
Type: enhancement Stage:
Components: Extension Modules Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: bpypy
Priority: normal Keywords:

Created on 2018-08-05 16:48 by bpypy, last changed 2022-04-11 14:59 by admin.

Messages (1)
msg323160 - (view) Author: bpypy (bpypy) Date: 2018-08-05 16:48
An obvious use case for mimetypes would be to check if file has correct mimetype, by getting the type with some of libmagic wrappers, and then comparing to guess_type result.

But it seems that they don't always match. One example:
applicattion/rar vs application/x-rar
https://github.com/file/file/blob/b9e60f088847f885b5c9fde61ff8fc9645843506/magic/Magdir/archive#L986

Kills half the usefullness of the module.
History
Date User Action Args
2022-04-11 14:59:04adminsetgithub: 78521
2018-08-05 16:48:48bpypycreate