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
C domain changes of Sphinx 3 prevent to write doc compatible with Sphinx 2 and Sphinx 3 #7899
Comments
IMO (but keep in mind, I'm just a watcher at this point): it's fine to introduce more strictness if
So I would vote for a fix here that enables any of these mitigations. |
I am perfectly fine with pushing massive changes to respect stricter Sphinx, but only if there is a way to keep Sphinx 2 support. |
There are indeed quite a lot of changes that may be a bit excessive in the amount of breakage. Though, fundamental change were needed to get the domain updated. |
Sure. |
Thank you! I'm now waiting for Sphinx 3.2 to update Python documentation ;-) |
The Python documentation can be found in the Doc/ directory of https://github.com/python/cpython/ It is quite big: 262k lines of .rst files (and 1300 of extensions written in Python: see Doc/tools/).
It is no longer possible to build the Python documentation with Sphinx 3, many syntax which were allowed previously ("tolerated"?) are now treated as errors: see https://bugs.python.org/issue40204 for details.
According to the Sphinx changelog, it is a deliberate that the C domain is more strict. Extract:
The problem is that I fail to find a way to write a documentation which can be built and rendered properly with Sphinx 2 and Sphinx 3. Dropping Sphinx 2 support is not an option for the Python project. Too many Linux distributions currently build the Python documentation with Sphinx 2, and it seems like upgrading to Sphinx 3 will break at least Python, but likely other projects documentation.
It seems like we have the following options for the Python documentation:
PyObject\*
(invalid C syntax), maybe as an opt-in optionExample of issue:
.. c:struct: MyStruct
is required by Sphinx 3 to document a structure, since ``.. c:type: MyStructis now treated as an error. But with Sphinx 2,
.. c:struct: MyStruct` section is simply ignored and the whole section miss from the HTML output.cc @birkenfeld
The text was updated successfully, but these errors were encountered: