alerta-contrib
alerta-contrib copied to clipboard
[Alerta-Mailer] Integration failed with Jinja2 Autoescape extension deprecation
Issue Summary I am working with Alerta Mailer Integration, however, I have recently faced an issue. The alerta-mailer integration is failing with deprecation of jinja2 extension autoescape. I am attaching screenshot below from the logs.
Below link also shows documentation of this issue. This extension has been removed from the jinja2 version 3.0.0+ and it is built-on now.
- https://stackoverflow.com/a/72706572
- https://jinja.palletsprojects.com/en/3.1.x/changes/#version-3-0-0
Proposed fix This issue can be fixed by removing the 'autoescape' extension from the code line. https://github.com/alerta/alerta-contrib/blob/4ba3682468fdd5308e964dc0097860edf8c7da15/integrations/mailer/mailer.py#L173