From 73dd830e86ad55fb1483ce13a537443301af31e9 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 25 Mar 2022 09:45:55 +0100 Subject: [PATCH] docs: Pin jinja2 to < 3.1.0 Jinja2 3.1.0 removed deprecated code that is still used by sphinx 1.8.x, and it looks like our custom sphinx extensions are not working with more recent versions of sphinx.. See: - https://github.com/pallets/jinja/issues/1631 - https://github.com/readthedocs/readthedocs.org/issues/9037 and - https://github.com/PowerDNS/pdns/pull/7712 The exact error is: ``` Extension error: Could not import extension sphinx.builders.latex (exception: cannot import name 'contextfunction' from 'jinja2' (/dnsdist/pdns/dnsdistdist/.venv/lib/python3.7/site-packages/jinja2/__init__.py)) ``` (cherry picked from commit 92ad29702011ac7cbd0d7d118ba612e7e07cedbe) --- docs/requirements.txt | 3 ++- pdns/dnsdistdist/docs/requirements.txt | 3 ++- pdns/recursordist/docs/requirements.txt | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 9cf30e4daacf..622263e53d84 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -4,4 +4,5 @@ git+https://github.com/pieterlexis/sphinx-jsondomain@no-type-links git+https://github.com/pieterlexis/sphinx-changelog@render-tags sphinxcontrib-fulltoc guzzle_sphinx_theme -docutils!=0.15 +docutils!=0.15,<0.18 +jinja2<3.1.0 diff --git a/pdns/dnsdistdist/docs/requirements.txt b/pdns/dnsdistdist/docs/requirements.txt index 63606d88e69a..5e3da903a230 100644 --- a/pdns/dnsdistdist/docs/requirements.txt +++ b/pdns/dnsdistdist/docs/requirements.txt @@ -4,4 +4,5 @@ git+https://github.com/pieterlexis/sphinx-jsondomain@no-type-links git+https://github.com/pieterlexis/sphinx-changelog@render-tags sphinxcontrib-httpdomain sphinxcontrib-fulltoc -docutils!=0.15 +docutils!=0.15,<0.18 +jinja2<3.1.0 diff --git a/pdns/recursordist/docs/requirements.txt b/pdns/recursordist/docs/requirements.txt index cd61585a5325..573799b8527d 100644 --- a/pdns/recursordist/docs/requirements.txt +++ b/pdns/recursordist/docs/requirements.txt @@ -5,4 +5,5 @@ git+https://github.com/pieterlexis/sphinx-changelog@render-tags guzzle_sphinx_theme sphinxcontrib.httpdomain sphinxcontrib-fulltoc -docutils!=0.15 +docutils!=0.15,<0.18 +jinja2<3.1.0