From d438c9073f984c0bab761186a1a2ce9e59bd6c4b 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 | 1 + pdns/dnsdistdist/docs/requirements.txt | 1 + pdns/recursordist/docs/requirements.txt | 1 + 3 files changed, 3 insertions(+) diff --git a/docs/requirements.txt b/docs/requirements.txt index 669c19b98508..622263e53d84 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -5,3 +5,4 @@ git+https://github.com/pieterlexis/sphinx-changelog@render-tags sphinxcontrib-fulltoc guzzle_sphinx_theme docutils!=0.15,<0.18 +jinja2<3.1.0 diff --git a/pdns/dnsdistdist/docs/requirements.txt b/pdns/dnsdistdist/docs/requirements.txt index c9a188e66396..5e3da903a230 100644 --- a/pdns/dnsdistdist/docs/requirements.txt +++ b/pdns/dnsdistdist/docs/requirements.txt @@ -5,3 +5,4 @@ git+https://github.com/pieterlexis/sphinx-changelog@render-tags sphinxcontrib-httpdomain sphinxcontrib-fulltoc docutils!=0.15,<0.18 +jinja2<3.1.0 diff --git a/pdns/recursordist/docs/requirements.txt b/pdns/recursordist/docs/requirements.txt index 5d88e2afefc3..573799b8527d 100644 --- a/pdns/recursordist/docs/requirements.txt +++ b/pdns/recursordist/docs/requirements.txt @@ -6,3 +6,4 @@ guzzle_sphinx_theme sphinxcontrib.httpdomain sphinxcontrib-fulltoc docutils!=0.15,<0.18 +jinja2<3.1.0