alerta / alerta-contrib

Contributed integrations, plugins and custom webhooks
http://alerta.io
MIT License
119 stars 170 forks source link

[Alerta-Mailer] Integration failed with Jinja2 Autoescape extension deprecation #393

Open mirzacodes opened 1 year ago

mirzacodes commented 1 year ago

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.

image

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.

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