From c7affdcc7aea07124a5bec7e969f072ef595d29a Mon Sep 17 00:00:00 2001 From: pcamach2 <49655443+pcamach2@users.noreply.github.com> Date: Tue, 26 Apr 2022 21:04:14 -0500 Subject: [PATCH] Pin Jinja2 version to prevent CircleCI build_docs failure Fix fail to build docs in CircleCI observed in testing draft changes made to PR #280. ``` #!/bin/bash -eo pipefail make -C docs SPHINXOPTS="-W" BUILDDIR="_build/no_version_html" html make: Entering directory '/tmp/gh-pages/docs' PYTHONPATH=/tmp/gh-pages sphinx-build -b html -d _build/no_version_html/doctrees -W . _build/no_version_html/html Traceback (most recent call last): File "/home/circleci/.local/bin/sphinx-build", line 5, in from sphinx.cmd.build import main File "/home/circleci/.local/lib/python3.8/site-packages/sphinx/cmd/build.py", line 23, in from sphinx.application import Sphinx File "/home/circleci/.local/lib/python3.8/site-packages/sphinx/application.py", line 42, in from sphinx.highlighting import lexer_classes, lexers File "/home/circleci/.local/lib/python3.8/site-packages/sphinx/highlighting.py", line 30, in from sphinx.ext import doctest File "/home/circleci/.local/lib/python3.8/site-packages/sphinx/ext/doctest.py", line 28, in from sphinx.builders import Builder File "/home/circleci/.local/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 24, in from sphinx.io import read_doc File "/home/circleci/.local/lib/python3.8/site-packages/sphinx/io.py", line 42, in from sphinx.util.rst import append_epilog, docinfo_re, prepend_prolog File "/home/circleci/.local/lib/python3.8/site-packages/sphinx/util/rst.py", line 22, in from jinja2 import environmentfilter ImportError: cannot import name 'environmentfilter' from 'jinja2' (/home/circleci/.local/lib/python3.8/site-packages/jinja2/__init__.py) make: *** [Makefile:61: html] Error 1 make: Leaving directory '/tmp/gh-pages/docs' Exited with code exit status 2 CircleCI received exit code 2 ``` From suggested fix for similar behavior: https://github.com/mkdocs/mkdocs/issues/2799 --- docs/requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/requirements.txt b/docs/requirements.txt index 3d2ac3a34a..aa1c4a6999 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -11,3 +11,4 @@ sphinx >= 2.1.2, < 3 sphinx_rtd_theme sphinxcontrib-apidoc ~= 0.3.0 templateflow +jinja2==3.0.3