Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions newsfragments/399.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix `sphinxcontrib-trio` for Sphinx 9.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
packages=find_packages(),
url="https://github.com/python-trio/sphinxcontrib-trio",
python_requires=">=3.6",
install_requires=["sphinx >= 2.0"],
install_requires=["sphinx >= 2.2"],
classifiers=[
'Development Status :: 5 - Production/Stable',
"Intended Audience :: Developers",
Expand Down
14 changes: 7 additions & 7 deletions sphinxcontrib_trio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,10 @@ def import_object(self):
# Register everything
################################################################

def mess_with_autodoc(app):
app.add_autodocumenter(ExtendedFunctionDocumenter, override=True)
app.add_autodocumenter(ExtendedMethodDocumenter, override=True)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems override=True is Sphinx 2.2 or later... That's old enough that I think it's OK to drop support for earlier versions?



def setup(app):
app.add_directive_to_domain('py', 'function', ExtendedPyFunction)
Expand All @@ -389,12 +393,8 @@ def setup(app):
app.add_directive_to_domain('py', 'decorator', ExtendedPyFunction)
app.add_directive_to_domain('py', 'decoratormethod', ExtendedPyMethod)

# Make sure sphinx.ext.autodoc is loaded before we try to mess with it.
app.setup_extension("sphinx.ext.autodoc")
# We're overriding these on purpose, so disable the warning about it
del directives._directives["autofunction"]
del directives._directives["automethod"]
app.add_autodocumenter(ExtendedFunctionDocumenter)
app.add_autodocumenter(ExtendedMethodDocumenter)
# autodoc registers things at config-inited w/o priority, so
# take the subsequent event
app.connect("builder-inited", mess_with_autodoc)

return {'version': __version__, 'parallel_read_safe': True}
97 changes: 53 additions & 44 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,82 +1,91 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile test-requirements.in
#
alabaster==0.7.12
# This file was autogenerated by uv via the following command:
# uv pip compile --universal --python-version=3.10 test-requirements.in -o test-requirements.txt
alabaster==1.0.0
# via sphinx
async-generator==1.10
# via -r test-requirements.in
attrs==21.4.0
# via pytest
babel==2.10.1
babel==2.17.0
# via sphinx
certifi==2022.5.18.1
certifi==2026.1.4
# via requests
charset-normalizer==2.0.12
charset-normalizer==3.4.4
# via requests
colorama==0.4.6 ; sys_platform == 'win32'
# via
# pytest
# sphinx
contextlib2==21.6.0
# via -r test-requirements.in
coverage[toml]==6.1.1
coverage==7.13.1
# via pytest-cov
cssselect==1.1.0
cssselect==1.3.0
# via -r test-requirements.in
docutils==0.17.1
docutils==0.21.2 ; python_full_version < '3.11'
# via sphinx
docutils==0.22.4 ; python_full_version >= '3.11'
# via sphinx
idna==3.3
exceptiongroup==1.3.1 ; python_full_version < '3.11'
# via pytest
idna==3.11
# via requests
imagesize==1.3.0
imagesize==1.4.1
# via sphinx
iniconfig==1.1.1
iniconfig==2.3.0
# via pytest
jinja2==3.0.3
jinja2==3.1.6
# via sphinx
lxml==4.8.0
lxml==6.0.2
# via -r test-requirements.in
markupsafe==2.0.1
markupsafe==3.0.3
# via jinja2
packaging==21.3
packaging==26.0
# via
# pytest
# sphinx
pluggy==1.0.0
# via pytest
py==1.11.0
# via pytest
pygments==2.12.0
# via sphinx
pyparsing==3.0.9
# via packaging
pytest==7.0.1
pluggy==1.6.0
# via
# pytest
# pytest-cov
pygments==2.19.2
# via
# pytest
# sphinx
pytest==9.0.2
# via
# -r test-requirements.in
# pytest-cov
pytest-cov==3.0.0
pytest-cov==7.0.0
# via -r test-requirements.in
pytz==2022.1
# via babel
requests==2.27.1
requests==2.32.5
# via sphinx
snowballstemmer==2.2.0
roman-numerals==4.1.0 ; python_full_version >= '3.11'
# via sphinx
sphinx==3.4.3
snowballstemmer==3.0.1
# via sphinx
sphinx==8.1.3 ; python_full_version < '3.11'
# via -r test-requirements.in
sphinx==9.0.4 ; python_full_version == '3.11.*'
# via -r test-requirements.in
sphinxcontrib-applehelp==1.0.2
sphinx==9.1.0 ; python_full_version >= '3.12'
# via -r test-requirements.in
sphinxcontrib-applehelp==2.0.0
# via sphinx
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-devhelp==2.0.0
# via sphinx
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
# via sphinx
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-qthelp==2.0.0
# via sphinx
sphinxcontrib-serializinghtml==1.1.5
sphinxcontrib-serializinghtml==2.0.0
# via sphinx
tomli==1.2.2
tomli==2.4.0 ; python_full_version <= '3.11'
# via
# coverage
# pytest
urllib3==1.26.8
# sphinx
typing-extensions==4.15.0 ; python_full_version < '3.11'
# via exceptiongroup
urllib3==2.6.3
# via requests
Loading