diff options
| author | Julien Castiaux <juc@odoo.com> | 2019-08-14 12:45:20 +0000 |
|---|---|---|
| committer | Julien Castiaux <juc@odoo.com> | 2019-09-17 11:20:13 +0000 |
| commit | 1b057dd76b19db00eb5b63dc02f87cdc13cc07cf (patch) | |
| tree | c1dd1597e47d68413a32f22cb03a21d18b37294c /addons/mail/wizard | |
| parent | a7a63bdb4a933fb54e78c3176e37ffca0e457735 (diff) | |
[REF] mail,test_mail: prefer EmailMessage over deprecated Message
[PEP 594][1] is going to depreciate legacy `email.message.Message` API in
PY3.8 in favor `email.message.EmailMessage`.
All `email.message_from_x` constructor functions take an optional
`policy` argument. The policy can either be `policy.compat32` to
generate an `email.message.Message` instance, either be `policy.SMTP`
to generate an `email.message.EmailMessage` instance.
The [current][2] default policy is `policy.compat32` but will change in
a future version of python. It is recommended to always specify the
policy.
[1]: https://www.python.org/dev/peps/pep-0594/#email-legacy-api
[2] https://docs.python.org/3.7/library/email.parser.html#email.parser.BytesParser
Diffstat (limited to 'addons/mail/wizard')
0 files changed, 0 insertions, 0 deletions
