-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Documentation builds fail with Sphinx 3.2.1 #89781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Since the release of Docutils 0.18 today building Python documentation fails. In CPython repository we have Sphinx pinned to 3.2.1, which has too loose requirement for Docutils version in install_requires – docutils>=0.12. Example of failing build: https://github.com/python/python-docs-pl/runs/4009459257. My suggestion is to pin down docutils in docs requirements. |
The pin can be removed after bumping Sphinx to at least 3.5.4, which introduced upper limit for docutils version. |
All of the open branches are affected by this since we also have to build documentation for security-fix-only branches when releases. PRs for 3.7 and 3.6 forthcoming. |
For what it's worth I have just successfully built documentation on 3.7 and 3.6 branches locally. It looks like Sphinx 2.3.1 used there doesn't use this part of docutils API that have changed recently. Sphinx 2.3.1 has requirement of "docutils>=0.12", just like 3.2.1. We can pin docutils version to current (0.18) "just in case" to prevent a breakage in the future or do nothing – maybe it won't break – maybe the docutils API used is narrow enough. |
It occurs that the documentation builds without warnings on most recent Sphinx -- version 4.2.0. Probably we should bump the version in 3.11, 3.10 and 3.9 to 4.2.0. That would enable us to remove the pin on docutils. |
I'm sorry for the confusion. I might have make more checking on my side before proposing a fix. |
After the Jinja version 3.1.0 release today [1], documentation builds fail for all stable branches. Sphinx in versions pinned on those branches fails with ImportError. [2] Backporting 14a4fce to 3.10 and 3.9 fixes the problem for them (build is successful with 4.2.0). For 3.8 and 3.7 pinning down Jinja is required (docs don't build smoothly with 4.2.0 for those branches). Could some core developer help with the backports? I am starting to work on PRs with pins for 3.8 and 3.7. [1] https://jinja.palletsprojects.com/en/3.1.x/changes/#version-3-1-0
[2] % sphinx-build --version
Traceback (most recent call last):
File "…/cpython/Doc/./venv/bin/sphinx-build", line 5, in <module>
from sphinx.cmd.build import main
File "…/cpython/Doc/venv/lib/python3.9/site-packages/sphinx/cmd/build.py", line 25, in <module>
from sphinx.application import Sphinx
File "…/cpython/Doc/venv/lib/python3.9/site-packages/sphinx/application.py", line 42, in <module>
from sphinx.registry import SphinxComponentRegistry
File "…/cpython/Doc/venv/lib/python3.9/site-packages/sphinx/registry.py", line 24, in <module>
from sphinx.builders import Builder
File "…/cpython/Doc/venv/lib/python3.9/site-packages/sphinx/builders/__init__.py", line 26, in <module>
from sphinx.util import import_object, logging, rst, progress_message, status_iterator
File "…/cpython/Doc/venv/lib/python3.9/site-packages/sphinx/util/rst.py", line 22, in <module>
from jinja2 import environmentfilter
ImportError: cannot import name 'environmentfilter' from 'jinja2' (…/cpython/Doc/venv/lib/python3.9/site-packages/jinja2/__init__.py) |
This really should be handled in a new issue since the original fixes for all affected releases are already in the field. Moreover, we should be a bit careful about bumping the required Sphinx version for older releases as this has caused problems for downstream distributors of Python in the past. Can't we just pin the Jinja2 version for current releases? |
Sorry, I got suggested too much with expected fix which is common for both of those issues. Shall I create a new issue?
Didn't know about the problems for distributors. Definitely just pinning Jinja2 is enough. |
I created https://bugs.python.org/issue47138, let's continue there. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: