nvda
a0bd47dc - Update to the latest version of Sphinx to fix build of developer documentation (#14011)

Commit
3 years ago
Update to the latest version of Sphinx to fix build of developer documentation (#14011) Summary of the issue: Currently when trying to execute scons devDocs build fails, and the following error is shown: D:\my_repos\nvda\.venv\Scripts\python.exe -m sphinx.cmd.build -M html devDocs devDocs\_build Traceback (most recent call last): File "C:\Python37\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "C:\Python37\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "D:\my_repos\nvda\.venv\lib\site-packages\sphinx\cmd\build.py", line 25, in <module> from sphinx.application import Sphinx File "D:\my_repos\nvda\.venv\lib\site-packages\sphinx\application.py", line 43, in <module> from sphinx.registry import SphinxComponentRegistry File "D:\my_repos\nvda\.venv\lib\site-packages\sphinx\registry.py", line 24, in <module> from sphinx.builders import Builder File "D:\my_repos\nvda\.venv\lib\site-packages\sphinx\builders\__init__.py", line 26, in <module> from sphinx.util import import_object, logging, progress_message, rst, status_iterator File "D:\my_repos\nvda\.venv\lib\site-packages\sphinx\util\rst.py", line 21, in <module> from jinja2 import Environment, environmentfilter ImportError: cannot import name 'environmentfilter' from 'jinja2' (D:\my_repos\nvda\.venv\lib\site-packages\jinja2\__init__.py) scons: *** [devDocs\_build] Error 1 scons: building terminated because of errors. The error is caused by the fact that the version of Sphinx we're using incorrectly specifies the range of Jinja2 on which it depends, and authors of Jinja2 removed various deprecated methods in version 3.1. The more recent version of Sphinx fixes this issue. Description of user facing changes Developers can once again build developer documentation. Description of development approach I've updated the version of Sphinx in our requirements file to the latest at the time. While at it I've also specified explicitly the version of sphinx_rtd_theme we need.
Author
Parents
Loading