From 000426095224401649827d6cdc5a7d5e0ef4e17c Mon Sep 17 00:00:00 2001 From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Date: Thu, 24 Mar 2022 18:42:04 +0000 Subject: Revert "Replace instances of deprecated `Jinja2.Markup` with `markupsafe.Markup`" (#12296) This reverts commit 8810c93e828a9ed1dcb008d08be8aa9fcb4d28c3. --- synapse/python_dependencies.py | 1 - 1 file changed, 1 deletion(-) (limited to 'synapse/python_dependencies.py') diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 232f9a9595..1dd39f06cf 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -75,7 +75,6 @@ REQUIREMENTS = [ "attrs>=19.2.0,!=21.1.0", "netaddr>=0.7.18", "Jinja2>=2.9", - "MarkupSafe>=2.0", "bleach>=1.4.3", # We use `ParamSpec`, which was added in `typing-extensions` 3.10.0.0. "typing-extensions>=3.10.0", -- cgit 1.4.1 From 84eb14c4d21315798048aed123c8222cfa96c566 Mon Sep 17 00:00:00 2001 From: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Date: Thu, 24 Mar 2022 18:59:31 +0000 Subject: Pin Jinja to <3.1.0 (#12297) as 3.1.0 removed the deprecated jinja2.Markup class which we still rely on. --- changelog.d/12297.misc | 1 + synapse/python_dependencies.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelog.d/12297.misc (limited to 'synapse/python_dependencies.py') diff --git a/changelog.d/12297.misc b/changelog.d/12297.misc new file mode 100644 index 0000000000..7bf05305f6 --- /dev/null +++ b/changelog.d/12297.misc @@ -0,0 +1 @@ +Pin Jinja to <3.1.0, as Synapse fails to start with Jinja 3.1.0. \ No newline at end of file diff --git a/synapse/python_dependencies.py b/synapse/python_dependencies.py index 1dd39f06cf..79ae06ce5d 100644 --- a/synapse/python_dependencies.py +++ b/synapse/python_dependencies.py @@ -74,7 +74,8 @@ REQUIREMENTS = [ # Note: 21.1.0 broke `/sync`, see #9936 "attrs>=19.2.0,!=21.1.0", "netaddr>=0.7.18", - "Jinja2>=2.9", + # Jinja2 3.1.0 removes the deprecated jinja2.Markup class, which we rely on. + "Jinja2<3.1.0", "bleach>=1.4.3", # We use `ParamSpec`, which was added in `typing-extensions` 3.10.0.0. "typing-extensions>=3.10.0", -- cgit 1.4.1