classification
Title: email message get_content throws KeyError for content main types font and model
Type: Stage:
Components: Versions: Python 3.10, Python 3.9, Python 3.8, Python 3.7, Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: msapiro
Priority: normal Keywords:

Created on 2020-10-16 19:24 by msapiro, last changed 2020-10-16 19:24 by msapiro.

Messages (1)
msg378738 - (view) Author: Mark Sapiro (msapiro) * (Python triager) Date: 2020-10-16 19:24
With Policy = email.policy.default, there are handlers for get_content() only for content types 'text', 'audio', 'image', 'video', 'application', 'message/rfc822', 'message/external-body' and 'message'. While these are the only main types listed in RFC 6838, RFC 8081 adds 'font' and RFC 2077 defines 'model' there are several registered 'font' and 'model' types at https://www.iana.org/assignments/media-types/media-types.xhtml

It would be good if get_content() returned content, even if only raw bytes, for those types.
History
Date User Action Args
2020-10-16 19:24:02msapirocreate