Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Description
Feature or enhancement
As of Python 3.10, the types map does not contain an entry for the valid mime type oftext/rtf. It only contains aapplication/rtf entry for non standard types. The missingtext/rtf mapping should be added as this is a valid mime type. For example this file type is guessed by thefile command (e.g. version 5.04; seelibmagic1). 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 otherrtf 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.