disnake icon indicating copy to clipboard operation
disnake copied to clipboard

docs: bump all documentation dependencies

Open onerandomusername opened this issue 3 months ago • 5 comments

What Changed

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

Changelogs

  • sphinx
    • https://www.sphinx-doc.org/en/master/changes/8.2.html
    • https://www.sphinx-doc.org/en/master/changes/8.1.html
    • https://www.sphinx-doc.org/en/master/changes/8.0.html
    • https://www.sphinx-doc.org/en/master/changes/7.4.html
    • https://www.sphinx-doc.org/en/master/changes/7.3.html
    • https://www.sphinx-doc.org/en/master/changes/7.2.html
    • https://www.sphinx-doc.org/en/master/changes/7.1.html
  • sphinx-autobuild
    • https://github.com/sphinx-doc/sphinx-autobuild/compare/2021.03.14...2025.08.25
  • sphinx-hoverxref
    • https://github.com/readthedocs/sphinx-hoverxref/compare/1.3.0...1.4.2
  • sphinx-notfound-page
    • https://github.com/readthedocs/sphinx-notfound-page/compare/0.8.2...1.1.0
  • sphinxcontrib-towncrier
    • https://github.com/sphinx-contrib/sphinxcontrib-towncrier/releases/tag/v0.5.0a0
    • https://github.com/sphinx-contrib/sphinxcontrib-towncrier/releases/tag/v0.4.0a0
  • sphinxcontrib-trio
    • no updates
  • towncrier
    • https://towncrier.readthedocs.io/en/stable/release-notes.html 23.6.0 -> 25.8.0

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.

onerandomusername avatar Aug 28 '25 21:08 onerandomusername

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

shiftinv avatar Aug 29 '25 20:08 shiftinv

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

onerandomusername avatar Aug 29 '25 20:08 onerandomusername

Documentation build overview

📚 disnake | 🛠️ Build #29781613 | 📁 Comparing 8913dc1e87c56143980b7733105c91b12ffec4af against latest (613e01d45d8eb0034a4f3fd524b64752e55b0b38)


🔍 Preview build

Show files changed (71 files in total): 📝 71 modified | ➕ 0 added | ➖ 0 deleted
File Status
404.html 📝 modified
api.html 📝 modified
discord.html 📝 modified
faq.html 📝 modified
index.html 📝 modified
intents.html 📝 modified
intro.html 📝 modified
logging.html 📝 modified
migrating.html 📝 modified
migrating_to_async.html 📝 modified
quickstart.html 📝 modified
search.html 📝 modified
version_guarantees.html 📝 modified
whats_new.html 📝 modified
whats_new_legacy.html 📝 modified
api/abc.html 📝 modified
api/activities.html 📝 modified
api/app_commands.html 📝 modified
api/app_info.html 📝 modified
api/audit_logs.html 📝 modified
api/automod.html 📝 modified
api/channels.html 📝 modified
api/clients.html 📝 modified
api/components.html 📝 modified
api/emoji.html 📝 modified
api/entitlements.html 📝 modified
api/events.html 📝 modified
api/exceptions.html 📝 modified
api/guild_scheduled_events.html 📝 modified
api/guilds.html 📝 modified
api/index.html 📝 modified
api/integrations.html 📝 modified
api/interactions.html 📝 modified
api/invites.html 📝 modified
api/localization.html 📝 modified
api/members.html 📝 modified
api/messages.html 📝 modified
api/misc.html 📝 modified
api/permissions.html 📝 modified
api/roles.html 📝 modified
api/skus.html 📝 modified
api/soundboard.html 📝 modified
api/stage_instances.html 📝 modified
api/stickers.html 📝 modified
api/subscriptions.html 📝 modified
api/ui.html 📝 modified
api/users.html 📝 modified
api/utilities.html 📝 modified
api/voice.html 📝 modified
api/webhooks.html 📝 modified
api/widgets.html 📝 modified
ext/commands/additional_info.html 📝 modified
ext/commands/api.html 📝 modified
ext/commands/cogs.html 📝 modified
ext/commands/commands.html 📝 modified
ext/commands/extensions.html 📝 modified
ext/commands/index.html 📝 modified
ext/commands/slash_commands.html 📝 modified
ext/tasks/index.html 📝 modified
ext/commands/api/app_commands.html 📝 modified
ext/commands/api/bots.html 📝 modified
ext/commands/api/checks.html 📝 modified
ext/commands/api/cogs.html 📝 modified
ext/commands/api/context.html 📝 modified
ext/commands/api/converters.html 📝 modified
ext/commands/api/events.html 📝 modified
ext/commands/api/exceptions.html 📝 modified
ext/commands/api/help_commands.html 📝 modified
ext/commands/api/index.html 📝 modified
ext/commands/api/misc.html 📝 modified
ext/commands/api/prefix_commands.html 📝 modified

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: https://github.com/DisnakeDev/disnake/blob/e93670d6480018a8344fd555ffdcb71019e966c3/docs/extensions/redirects.py#L40-L44
    • 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 avatar Sep 28 '25 11:09 shiftinv

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.~~
    • edit: data-content_root is missing on the root element, see https://github.com/sphinx-doc/sphinx/issues/11608#issuecomment-1684410476
  • 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)

shiftinv avatar Sep 28 '25 19:09 shiftinv