Skip to content

Conversation

@Paillat-dev
Copy link
Member

@Paillat-dev Paillat-dev commented Jan 15, 2026

Summary

The dependencies need to be upgraded together in order to be able to upgrade to sphinx v9.

Closes: #3084
Closes: #3013
Closes: #3024

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.

@pycord-app
Copy link

pycord-app bot commented Jan 15, 2026

Thanks for opening this pull request!
Please make sure you have read the Contributing Guidelines and Code of Conduct.

This pull request can be checked-out with:

git fetch origin pull/3067/head:pr-3067
git checkout pr-3067

This pull request can be installed with:

pip install git+https://github.com/Pycord-Development/pycord@refs/pull/3067/head

@Paillat-dev Paillat-dev changed the title ⬆️ chore(docs): upgrade Sphinx and related dependencies to latest versions chore(docs): ⬆️ upgrade Sphinx and related dependencies to latest versions Jan 15, 2026
@Paillat-dev
Copy link
Member Author

After doing some research, the main issue arising is the lack of support for documenting context managers and generators (:async-for:, :async-with:). The rest, notably :decorator: for our specific purpose, can be replaced with .. autodecorator. I still need to research :async: usage, which was introduced in sphinx 2.1.0, but sphinxcontrib-trio provided autodetection for. I hope sphinx can natively detect wether a function is a coroutinefunction, it should make our work easier.

Ref: sphinx-doc/sphinx#3743

@Paillat-dev
Copy link
Member Author

After some testing, below is the difference between an async method with sphinxcontrib-trio and without. Both are autodetected, but they show await and async as prefix, respectively.

sphinx with sphinxcontrib-trio
image
bare sphinx
image

@Paillat-dev
Copy link
Member Author

Update, it seems like .. autodecorator creates a "function" from sphinx's point of view, which means it is excluded from our custom .. attributetable. We would need to either implement our own :decorator: or something similar, or modify .. autodecorator to not ignore functions created with .. autodecorator that are in fact supposed to be method-decorators.

@Lulalaby Lulalaby added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code labels Jan 16, 2026
@Lulalaby
Copy link
Member

Cursed

@Paillat-dev Paillat-dev added priority: medium Medium Priority status: in progress Work in Progess labels Jan 16, 2026
@Paillat-dev Paillat-dev added this to the v2.8 milestone Jan 29, 2026
@Paillat-dev Paillat-dev added status: awaiting review Awaiting review from a maintainer and removed status: in progress Work in Progess labels Jan 29, 2026
@Paillat-dev Paillat-dev marked this pull request as ready for review January 29, 2026 10:19
@Paillat-dev Paillat-dev requested review from a team as code owners January 29, 2026 10:19
@Paillat-dev
Copy link
Member Author

sphinxcontrib_trio got updated and it works for now, but we should maybe consider moving away from it at some point to lower our number of dependencies

@Paillat-dev Paillat-dev requested a review from Dorukyum January 29, 2026 10:21
@Lulalaby
Copy link
Member

agreed

@Lulalaby Lulalaby merged commit f170362 into master Jan 30, 2026
26 of 28 checks passed
@Lulalaby Lulalaby deleted the docs/upgrade-sphinx-9 branch January 30, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation github_actions Pull requests that update GitHub Actions code priority: medium Medium Priority status: awaiting review Awaiting review from a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants