From f6608f009bff3c76d70749340dcc0ef08a7f6f5d Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Wed, 6 Apr 2022 13:09:09 +0100 Subject: [PATCH] Pin Jinja2 to 3.0.x for testing, and add upgrade note --- docs/releases/2.16.2.md | 6 ++++++ setup.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/releases/2.16.2.md b/docs/releases/2.16.2.md index 7a3315540e..7df6fd5e6a 100644 --- a/docs/releases/2.16.2.md +++ b/docs/releases/2.16.2.md @@ -13,3 +13,9 @@ * Update django-treebeard dependency to 4.5.1 or above (Serafeim Papastefanos) * Fix permission error when sorting pages having page type restrictions (Thijs Kramer) * Allow bulk publishing of pages without revisions (Andy Chosak) + +## Upgrade considerations + +### Jinja2 compatibility + +Developers using Jinja2 templating should note that the template tags in this release (and earlier releases in the 2.15.x and 2.16.x series) are compatible with Jinja2 2.11.x and 3.0.x. Jinja2 2.11.x is unmaintained and requires ``markupsafe`` to be pinned to version ``<2.1`` to work; Jinja2 3.1.x has breaking changes and is not compatible. We therefore recommend that you use Jinja2 3.0.x, or 2.11.x with fully pinned dependencies. diff --git a/setup.py b/setup.py index 81fcfd7867..9673bc5e7c 100755 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ testing_extras = [ 'python-dateutil>=2.7', 'pytz>=2014.7', 'elasticsearch>=5.0,<6.0', - 'Jinja2>=3.0,<4.0', + 'Jinja2>=3.0,<3.1', 'boto3>=1.16,<1.17', 'freezegun>=0.3.8', 'openpyxl>=2.6.4',