New submission from Hugo van Kemenade <hugovk+pyt...@gmail.com>:

The docs build on GitHub Actions is passing on `main` but has started failing 
for the `3.7` - `3.10` branches:

```
Missing the required blurb or sphinx-build tools.
Please run 'make venv' to install local copies.

make[1]: *** [Makefile:50: build] Error 1
```

https://github.com/python/cpython/actions/workflows/doc.yml
https://github.com/python/cpython/runs/5714593700?check_suite_focus=true

This is because the `PATH=./venv/bin:$PATH sphinx-build --version` check is 
failing:

```
/home/runner/work/cpython/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/util/docutils.py:45:
 DeprecationWarning: distutils Version classes are deprecated. Use 
packaging.version instead.
  __version_info__ = tuple(LooseVersion(docutils.__version__).version)
Traceback (most recent call last):
  File "/home/runner/work/cpython/cpython/Doc/./venv/bin/sphinx-build", line 5, 
in <module>
    from sphinx.cmd.build import main
  File 
"/home/runner/work/cpython/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/cmd/build.py",
 line 25, in <module>
    from sphinx.application import Sphinx
  File 
"/home/runner/work/cpython/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/application.py",
 line 42, in <module>
    from sphinx.registry import SphinxComponentRegistry
  File 
"/home/runner/work/cpython/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/registry.py",
 line 24, in <module>
    from sphinx.builders import Builder
  File 
"/home/runner/work/cpython/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/builders/__init__.py",
 line 26, in <module>
    from sphinx.util import import_object, logging, rst, progress_message, 
status_iterator
  File 
"/home/runner/work/cpython/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/util/rst.py",
 line 22, in <module>
    from jinja2 import environmentfilter
ImportError: cannot import name 'environmentfilter' from 'jinja2' 
(/home/runner/work/cpython/cpython/Doc/venv/lib/python3.10/site-packages/jinja2/__init__.py)
```

This is because `3.10` and `3.9` are still using old versions of Sphinx (3.2.1 
and 2.4.4 respectively) which is incompatible with the newest Jinja2:

https://github.com/pallets/jinja/issues/1630

`main` is using a newer Sphinx (4.2.0), so it passes.

Bumping to Sphinx 4.5.0 will fix both `3.9` and `3.10`. `3.7` and `3.8` are 
affected too. We can bump `main` to use `4.5.0` as well.

----------
assignee: docs@python
components: Documentation
messages: 416149
nosy: docs@python, hugovk
priority: normal
severity: normal
status: open
title: Bump Sphinx to fix docs build
versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue47138>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to