[issue47138] Bump Sphinx to fix docs build
New submission from Hugo van Kemenade <hugovk+python@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 <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Hugo van Kemenade <hugovk+python@gmail.com> added the comment: re: https://bugs.python.org/issue45618#msg416017 Maciej Olko, please could you update these PRs to keep the Sphinx version the same and only pin Jinja2 to match? 3.7: https://github.com/python/cpython/pull/32109 3.8: https://github.com/python/cpython/pull/32111 I guess update them to use this bpo too. Thanks! ---------- title: Bump Sphinx to fix docs build -> Bump Sphinx or pin Jinja2 to fix docs build _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Change by Maciej Olko <maciej.olko@gmail.com>: ---------- keywords: +patch nosy: +Maciej Olko nosy_count: 2.0 -> 3.0 pull_requests: +30231 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32111 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Change by Maciej Olko <maciej.olko@gmail.com>: ---------- pull_requests: +30232 pull_request: https://github.com/python/cpython/pull/32109 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Maciej Olko <maciej.olko@gmail.com> added the comment: I've update both PRs to contain the pin only. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Ned Deily <nad@python.org> added the comment: Thank you both for addressing this. The main reason for minimizing changes to the docs build chain for brances in bugfix or security-fix-only phases is that many distributors of Python also release the Python docs as a package and they do not necessarily rely on using our fairly-recent venv step in the Docs Makefile. In particular, they want to use the versions of Sphinx et al that they release as packages. If we change the required versions for these mid-stream, they not only have to update the docs themselves but have to go through the process of updating the other packages (like Sphinx) which may have other consequences. This can also impact our own on-line doc building process. (Version updates for a new Python feature release prior to its entering beta phase are not a problem.) So it is best to do the minimal amount of version updating for releases in the field, preferably none (as in pinning existing versions). In that spirit, we should also just pin the Jinja2 version for 3.10 and 3.9. ---------- nosy: +ned.deily _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Change by Hugo van Kemenade <hugovk+python@gmail.com>: ---------- pull_requests: +30234 pull_request: https://github.com/python/cpython/pull/32153 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Change by Hugo van Kemenade <hugovk+python@gmail.com>: ---------- pull_requests: +30235 pull_request: https://github.com/python/cpython/pull/32154 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Hugo van Kemenade <hugovk+python@gmail.com> added the comment: I cherry picked Maciej's 3.8 commit into 3.9 and 3.10 PRs: 3.9: https://github.com/python/cpython/pull/32153 3.10: https://github.com/python/cpython/pull/32154 And marking this issue as not relevant to 3.11; instead I bumped the Sphinx version in bpo-47126 / gh-32124 as it's directly relevant there. Thanks! ---------- title: Bump Sphinx or pin Jinja2 to fix docs build -> Pin Jinja2 to fix docs build versions: -Python 3.11 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Ned Deily <nad@python.org> added the comment: New changeset 25f00bfb264a3197ac91c41cdec15036fd8401f1 by m-aciek in branch '3.7': bpo-47138: Fix documentation build by pinning Jinja version to 3.0.3 (GH-32111) https://github.com/python/cpython/commit/25f00bfb264a3197ac91c41cdec15036fd8... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Ned Deily <nad@python.org> added the comment: New changeset 9194a7b8990a0feec1209b1e5694df3bf42906d8 by Hugo van Kemenade in branch '3.10': bpo-47138: Fix documentation build by pinning Jinja version to 3.0.3 (GH-32154) https://github.com/python/cpython/commit/9194a7b8990a0feec1209b1e5694df3bf42... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Ned Deily <nad@python.org> added the comment: New changeset 25c40bd994aa0da75283c5efdd71ba26c734b67e by Hugo van Kemenade in branch '3.9': bpo-47138: Fix documentation build by pinning Jinja version to 3.0.3 (GH-32153) https://github.com/python/cpython/commit/25c40bd994aa0da75283c5efdd71ba26c73... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Ned Deily <nad@python.org> added the comment: Thanks, everyone! Merged for 3.10.5, 3.9.13, and 3.7.14. I'll leave the issue in pending state until merged for 3.8.14. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> pending _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Change by Steve Dower <steve.dower@python.org>: ---------- nosy: +steve.dower nosy_count: 4.0 -> 5.0 pull_requests: +30239 status: pending -> open pull_request: https://github.com/python/cpython/pull/32161 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Steve Dower <steve.dower@python.org> added the comment: New changeset 295114dcd32b3aad5453e5e15e9e1befa0e5ca01 by Steve Dower in branch 'main': bpo-47138: Ensure Windows docs build uses the same pinned version as other platforms (GH-32161) https://github.com/python/cpython/commit/295114dcd32b3aad5453e5e15e9e1befa0e... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Change by Steve Dower <steve.dower@python.org>: ---------- pull_requests: +30241 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/32163 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Steve Dower <steve.dower@python.org> added the comment: New changeset 0dfabf9b4a58b835b61fc3d17784d4746f677e56 by Steve Dower in branch '3.10': bpo-47138: Ensure Windows docs build uses the same pinned version as other platforms (GH-32161) https://github.com/python/cpython/commit/0dfabf9b4a58b835b61fc3d17784d4746f6... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +30245 pull_request: https://github.com/python/cpython/pull/32167 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +30246 pull_request: https://github.com/python/cpython/pull/32168 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Change by miss-islington <mariatta.wijaya+miss-islington@gmail.com>: ---------- pull_requests: +30247 pull_request: https://github.com/python/cpython/pull/32169 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
miss-islington <mariatta.wijaya+miss-islington@gmail.com> added the comment: New changeset d2c6a4428d52c108f4b06dcd1bb86023541c60ce by Miss Islington (bot) in branch '3.9': bpo-47138: Ensure Windows docs build uses the same pinned version as other platforms (GH-32161) https://github.com/python/cpython/commit/d2c6a4428d52c108f4b06dcd1bb86023541... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Change by Steve Dower <steve.dower@python.org>: ---------- pull_requests: +30259 pull_request: https://github.com/python/cpython/pull/32182 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Ned Deily <nad@python.org> added the comment: New changeset d97497bf1cc6abd4a9a67d8da4f00cf13b3af4b3 by Steve Dower in branch '3.7': bpo-47138: Ensure Windows docs build uses the same pinned version as other platforms (GH-32182) https://github.com/python/cpython/commit/d97497bf1cc6abd4a9a67d8da4f00cf13b3... ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Change by Steve Dower <steve.dower@python.org>: ---------- pull_requests: +30260 pull_request: https://github.com/python/cpython/pull/32183 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
Łukasz Langa <lukasz@langa.pl> added the comment: New changeset d35af52caae844cb4ea0aff06fa3fc5328708af1 by m-aciek in branch '3.8': [3.8] bpo-47138: Fix documentation build by pinning Jinja version to 3.0.3 (GH-32109) https://github.com/python/cpython/commit/d35af52caae844cb4ea0aff06fa3fc53287... ---------- nosy: +lukasz.langa _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue47138> _______________________________________
participants (6)
-
Hugo van Kemenade
-
Maciej Olko
-
miss-islington
-
Ned Deily
-
Steve Dower
-
Łukasz Langa