Skip to content

docs: bump all documentation dependencies#1325

Open
onerandomusername wants to merge 18 commits into
masterfrom
docs/bump-sphinx-8
Open

docs: bump all documentation dependencies#1325
onerandomusername wants to merge 18 commits into
masterfrom
docs/bump-sphinx-8

Conversation

@onerandomusername
Copy link
Copy Markdown
Member

@onerandomusername onerandomusername commented Aug 28, 2025

What Changed

Bump all documentation dependencies, restrict them to python 3.11, bump the entire documentation to 3.11 too.

Changelogs

Deprecations

sphinx-hoverxref uses some interfaces removed in sphinx 9.0. However, sphinx-hoverxref is it itself deprecated, so we should drop it anyhow.

Depends on

#1341, which limits docs to only being typechecked on the version it runs on.

@shiftinv shiftinv added t: dependencies Addition/update/removal of dependencies t: documentation Improvements or additions to documentation/examples labels Aug 29, 2025
@shiftinv
Copy link
Copy Markdown
Member

Are you planning on dropping hoverxref in this or in a separate PR?

@onerandomusername
Copy link
Copy Markdown
Member Author

Are you planning on dropping hoverxref in this or in a separate PR?

Planning to drop hoverxref on another PR.

This one is also blocked by needing to figure out pyright 3.8-3.10 overrides

Comment thread pyproject.toml
@onerandomusername onerandomusername force-pushed the docs/bump-sphinx-8 branch 3 times, most recently from 4857b3b to ae1143c Compare September 5, 2025 02:31
@onerandomusername onerandomusername force-pushed the docs/bump-sphinx-8 branch 2 times, most recently from ea89f22 to 47f9903 Compare September 17, 2025 21:56
@read-the-docs-community
Copy link
Copy Markdown

read-the-docs-community Bot commented Sep 17, 2025

Documentation build overview

📚 disnake | 🛠️ Build #32838539 | 📁 Comparing 95ebd03 against latest (55392d3)

  🔍 Preview build  

71 files changed · ± 71 modified

± Modified

@onerandomusername onerandomusername marked this pull request as ready for review September 20, 2025 20:33
@onerandomusername onerandomusername added the s: needs review Issue/PR is awaiting reviews label Sep 23, 2025
@github-project-automation github-project-automation Bot moved this to Todo in disnake Sep 23, 2025
@shiftinv
Copy link
Copy Markdown
Member

shiftinv commented Sep 28, 2025

Looks good overall! A couple things:

  • Could we just filter the sphinx 9.0 deprecation warning for the time being, until we replace hoverxref properly?
  • Low priority, but this info log is pretty noisy, could potentially filter it
  • Similarly, Converting `source_suffix = '.rst'` to `source_suffix = {'.rst': 'restructuredtext'}`. - we could update this in conf.py as well. It's always been doing this conversion, but the log was only added recently
  • On subsequent autobuild runs, I'm getting Aborted attempted copy from rendered template _templates/api_redirect.js_t [...]. As far as I can tell, we now need a force=True here:
    copy_asset_file(
    SCRIPT_PATH,
    str(Path(app.outdir, "_static", "api_redirect.js")),
    context=context,
    )
    • Somewhat related, since the copy_redirect_script hook here takes Exception instead of Exception | None, type checkers consider most of that function dead code

@shiftinv
Copy link
Copy Markdown
Member

shiftinv commented Sep 28, 2025

A couple more things I noticed:

  • Sphinx added the classic purple coloring to visited links, the contrast with the documentation's background color is awful (contrast ratio of 1.05):
    image
    I think the best solution would be to override that selector and remove the highlight, visited link tracking for a documentation website seems fairly pointless to me anyway.
  • Maybe it's just the PR preview build, but search is pretty broken outside of the indexed results; it requests pages like https://disnake--1325.org.readthedocs.build/en/1325/undefinedext/tasks/index.html, which obviously don't resolve. Haven't really investigated why, yet.
  • Redirects from the old api.html#ref to api/page.html#ref are broken, since URL_ROOT no longer exists (see previous point). We should use document.documentElement.dataset.content_root instead.

(also, thanks for including links to all the changelogs <3)

this is by no means perfect; long story short, sphinx changed
the search scorer algorithm to actually take the configured `title`
score (15) into account for matching titles, instead of a fixed 100.
This, in turn, meant that any and all page matches would now be ranked at the bottom,
since the custom search scorer inflates the score of all `disnake.*` objects to
a score right below 100.

To resolve this, the scorer now assigns these API results a score of
14-15, i.e. right below pages with matching titles again.
API results with a longer or later submatch continue to receive a higher score penalty,
and are therefore closer to 14 rather than 15.
@shiftinv shiftinv requested a review from a team as a code owner May 25, 2026 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

s: needs review Issue/PR is awaiting reviews skip news t: dependencies Addition/update/removal of dependencies t: documentation Improvements or additions to documentation/examples

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants