From 7b2804bb3b96c9903c85998479a999dba2b85b25 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Sat, 19 Feb 2022 20:28:21 +0100 Subject: [PATCH] Require an older version of markupsafe for the sake of older Jinja2 Jinja2 <3.0 require markupsafe <2.1.0, but does not declare this requirement. (Jinja2 2.x has not been updated since markupsafe 2.1.0 came out). So declare this requirement ourselves. This is not ideal, since we would want to use the latest markupsafe with the latest Jinja2. But at least it gives us a consistent set of versions to run the CI with. Signed-off-by: Gilles Peskine --- scripts/driver.requirements.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/driver.requirements.txt b/scripts/driver.requirements.txt index 17569bb170..38838f58bc 100644 --- a/scripts/driver.requirements.txt +++ b/scripts/driver.requirements.txt @@ -1,10 +1,16 @@ # Python package requirements for driver implementers. +# Jinja2 <3.0 needs an older version of markupsafe, but does not +# declare it. +# https://github.com/pallets/markupsafe/issues/282 +# https://github.com/pallets/jinja/issues/1585 +markupsafe < 2.1 + # Use the version of Jinja that's in Ubuntu 20.04. # See https://github.com/ARMmbed/mbedtls/pull/5067#discussion_r738794607 . # Note that Jinja 3.0 drops support for Python 3.5, so we need to support # Jinja 2.x as long as we're still using Python 3.5 anywhere. Jinja2 >= 2.10.1 -# Jinja2 >=2.10, <<3.0 needs a separate package for type annotations +# Jinja2 >=2.10, <3.0 needs a separate package for type annotations types-Jinja2