Description
Feature or enhancement
As of Python 3.10, the types map does not contain an entry for the valid mime type of text/rtf
. It only contains a application/rtf
entry for non standard types. The missing text/rtf
mapping should be added as this is a valid mime type. For example this file type is guessed by the file
command (e.g. version 5.04; see libmagic1). My temporary workaround is to add the mapping manually:
mimetypes.add_type("text/rtf", ".rtf", strict=False)
I would dare to add it to the list of standard types, but to be consistend with the other rtf
mapping I'd add it to the non standard (strict=False
) list.
Pitch
The feature is implemented in a pull request pointing to this issue. I simply adds one one line with the mapping. Other python lovers could take advantage of this functional mapping of a valid mime type to an extension.