-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Use the latest Sphinx version #125722
Comments
@AA-Turner It would be helpful to have the latest version of Sphinx build the latest release of CPython. I suspect most users will view documentation on python.org. |
Yep, and we currently use the latest version of Sphinx on docs.python.org (see the footer for "Created using ..."). This proposal would in effect mean we can narrow the range between the minimum supported and what we use in A |
From the Fedora point of view, we have no trouble allowing the latest/development Python 3.X version documentation to use the latest version of Sphinx. My understanding it that this is usually the only Python version that needs to use the new features (such as new Python syntax). Once the features of a Python branch are stable, the required Sphinx version IMHO should also remain stable. In the past, you proposed bumping the minimum Sphinx version for older Python versions, such as 3.12. That might sometimes be problematic for us. That said, your communication wrt. such bumps was always appreciated but never taken for granted. If you decide to always use the latest Sphinx for Python 3.12, 3.12, etc. at this point, it might be a bit challenging for us, but it won't be a blocker. |
Thank you @hroncok, this is good to know.
Our development workflow means that we backport almost all documentation PRs to stable versions of Python (currently 3.12 & 3.13). This is mainly so that the website at https://docs.python.org/3/ shows the latest documentation, as This would mean that we would increase the minimum version for both HEAD and also all bugfix branches (or at least the most recent bugfix branch). The proposal wouldn't have much value without this, as it would effectively prohibit us from being able to confidently backport PRs. Hopefully this is a little clearer. I think that it falls into the 'challenging but manageable' category of your response, if I'm understanding correctly. A |
Documentation
Python's documentation uses the Sphinx toolchain. Originally written for the Python documentation, it is now developed and distributed as an independent project. The two remain closely linked, e.g. when new syntax is added to the Python language. To document this syntax in the best way, Sphinx must support it and Python must require a version of Sphinx that supports the syntax.
Using the new syntax in PEP-695 as an example:
py:function
andpy:class
directives. sphinx-doc/sphinx#11444)This is a ~two month window from implementation to support in a release of Sphinx. It took a further 15 months and two feature releases (3.12, 3.13) until these features can be used in Python. Due to this, our documentation is meaningfully worse for readers and programmers. Using older versions of Sphinx mean that we cannot succinctly cover the features and syntax that exist within released versions of Python.
Core developers responsible for these features have expressed interest, but have been hampered by our self-imposed restriction of the minimum version of Sphinx that we support.
We adopt these restrictions for the benefit of downstream Linux redistributors, as can be seen in the more recent issues in the summary table below. This has not always been the case. From the adoption of Sphinx in 2007 (8ec7f65 / 116aa62) until 2014 (f7b2f36), the latest source-tree checkout of Sphinx at https://svn.python.org/ was used. From then until ~2018 the minimum required Sphinx version (controlled by
needs_sphinx
inconf.py
) tracked the latest release promptly. This has since ossified.In a recent informal discussion, several committers supported the idea of removing or relaxing this restriction, allowing the Python documentation to use the latest version(s) of Sphinx. This is the context for this note, which for now is a proposal. The status quo will prevail if there is not sufficient support.
As a concrete suggestion, I propose that when evaulating increasing the minimum required version of Sphinx, we no longer consult downstream redistributors' Sphinx versions. The procedure will follow standard Python development processes in all other ways. I expect that the minimum version would be updated if and when a new Sphinx feature is of sufficient benefit to Python. This, though, may be a greater version than a downstream redistributor provides.
We would like to solicit views from representatives of downstream redistributors as to how (in)feasible this proposal would be. My understanding is that Fedora and SUSE have processes whereby a newer version of Sphinx can be used soley for the Python documentation. I do not know how this will impact Debian or Gentoo.
Thank you in advance for your consideration,
Adam
Table of past changes to
needs_sphinx
needs_sphinx
Previous discussion relating to the minumum version:
cc:
Footnotes
At commit date. ↩
The text was updated successfully, but these errors were encountered: