Daily updates from Odoo
Thursday, September 19, 2019
2 changes · master
Code cleanup and technical improvements
This change updates Odoo's documentation tooling to stop using an outdated Python component that is being removed in newer Python versions. It helps keep the documentation build process compatible with future Python releases without affecting business features or users.
Original PR description
[PEP 594] is going deprecates the `imp` standard modules in PY3.8 in order to completely remove them in PY3.10. The `imp` module provides the `new_module` function. It returns a new module created solely using its name. The `types.ModuleName` is a drop-in replacement. Task: 2003936 [PEP 594]: https://www.python.org/dev/peps/pep-0594/\#imp Was #35929
This update replaces a deprecated email formatting method used when sending appraisal, referral, and signature-related emails. It helps keep these workflows compatible with newer Python standards without changing the business process for users.
Original PR description
[REF] mail: remove deprecated email formataddr [PEP 594] is going to depreciate the legacy `email.message.Message` API and its related modules. Among them the `email.utils.formataddr` function, this function takes a `(name, email)` pair and returns a string value suitable for From, To and CC headers. The function has been re-implemented by Odoo/Odoo#a5ea588e to support the character encoding and binary-to-text encoding used by Odoo. See https://github.com/odoo/odoo/pull/35929