summary refs log tree commit diff
path: root/synapse/python_dependencies.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2022-03-28 19:02:57 +0200
committerGitHub <noreply@github.com>2022-03-28 17:02:57 +0000
commit4ba55a620f9bc8e4881aaa0435f8f83edf163062 (patch)
tree9af03d5ac7e47121c63aa15a55224267a72a4037 /synapse/python_dependencies.py
parentAllow modules to store already existing 3PID associations (#12195) (diff)
downloadsynapse-4ba55a620f9bc8e4881aaa0435f8f83edf163062.tar.xz
Un-revert Jinja2 fix (#12313)
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Diffstat (limited to '')
-rw-r--r--synapse/python_dependencies.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py
index 79ae06ce5d..8419ab3aca 100644
--- a/synapse/python_dependencies.py
+++ b/synapse/python_dependencies.py
@@ -74,8 +74,10 @@ REQUIREMENTS = [
     # Note: 21.1.0 broke `/sync`, see #9936
     "attrs>=19.2.0,!=21.1.0",
     "netaddr>=0.7.18",
-    # Jinja2 3.1.0 removes the deprecated jinja2.Markup class, which we rely on.
-    "Jinja2<3.1.0",
+    # Jinja 2.x is incompatible with MarkupSafe>=2.1. To ensure that admins do not
+    # end up with a broken installation, with recent MarkupSafe but old Jinja, we
+    # add a lower bound to the Jinja2 dependency.
+    "Jinja2>=3.0",
     "bleach>=1.4.3",
     # We use `ParamSpec`, which was added in `typing-extensions` 3.10.0.0.
     "typing-extensions>=3.10.0",