-
- Downloads
[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
Showing
- addons/l10n_it_edi/models/ir_mail_server.py 2 additions, 1 deletionaddons/l10n_it_edi/models/ir_mail_server.py
- addons/mail/models/mail_thread.py 9 additions, 8 deletionsaddons/mail/models/mail_thread.py
- addons/test_mail/tests/test_mail_gateway.py 12 additions, 8 deletionsaddons/test_mail/tests/test_mail_gateway.py
Loading
Please register or sign in to comment