Fix the broken docs tox environment - #2689
Open
chala2001 wants to merge 1 commit into
Open
Conversation
tox -e docs runs "python setup.py build_sphinx", a command that came from
sphinx.setup_command. Sphinx removed it in 7.0 and test-requirements.txt pins
sphinx>=8.1.3, so the environment fails with:
error: invalid command 'build_sphinx'
Runs the build documented in doc/README.md instead, and pulls in
doc/requirements-docs.txt. doc/source/conf.py imports recommonmark, which none
of the four requirements files tox already installs provides, so the
environment could not have worked even with the command fixed.
setup.cfg held only [build_sphinx] and [upload_sphinx], both settings for that
removed command, so it goes with them.
Also refreshes envlist, which still named py36 through py39. setup.py has
required 3.10 for a while now, and CI tests 3.10 through 3.14.
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: chala2001 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind bug
/kind cleanup
What this PR does / why we need it:
tox -e docscannot run. It callspython setup.py build_sphinx, and that commandcame from
sphinx.setup_command, which Sphinx removed in 7.0.test-requirements.txtpins
sphinx>=8.1.3, so on a current checkout:Fixing the command alone is not enough.
doc/source/conf.pyimportsrecommonmarkand lists it as an extension, and
recommonmarkappears in none of the fourrequirements files the tox env already installs - it is only in
doc/requirements-docs.txt, which the env never pulls in. So the environment wouldstill have failed while loading
conf.py.This PR points the env at the build
doc/README.mddocuments (make html, which issphinx-apidocthensphinx-build) and addsdoc/requirements-docs.txtto its deps.After the change:
Two related bits of tidying that belong to the same story:
setup.cfgcontained[build_sphinx]and[upload_sphinx]and nothing else. Bothare settings for the command Sphinx removed, so the file goes with them. The only
other
setup.cfgreferences in the tree are to the generatedkubernetes/setup.cfg,which is a flake8 config and is untouched.
envliststill namedpy3{6,7,8,9}.setup.pysetspython_requires='>=3.10'andCI tests 3.10 through 3.14, so all four named environments are below the supported
floor.
Which issue(s) this PR fixes:
No open issue - I hit this while looking at the packaging config in #2687 and #2688.
Happy to file one first if you would prefer that.
Special notes for your reviewer:
I verified the docs toolchain itself is healthy under Sphinx 8.1.3 -
sphinx-buildloads
conf.pywithrecommonmarkandsphinx_markdown_tablesand reportsbuild succeeded, andsphinx-apidocgenerates all 1,810 module pages. I did notrun the full 1,800-module render to completion; that build is memory-hungry and my
machine ran out of RAM part way through writing HTML. Everything this PR claims is
about the tox environment resolving and invoking the right command, which is what
the
docs: OKabove shows.Independent of #2688 - different branch, no shared files.
Does this PR introduce a user-facing change?