sphinx-doc / sphinx

The Sphinx documentation generator
https://www.sphinx-doc.org/
Other
6.23k stars 2.04k forks source link

AttributeError: module 'sphinx_autodoc_typehints' has no attribute 'builder_ready' #10390

Open BobDenny opened 2 years ago

BobDenny commented 2 years ago

Describe the bug

Updating packages with pip, can't tell which one broke it, Now my formerly working Sphinx fails immediately on make html. See Expectation below for a run before I updated packages. No change to Sphinx/.py docstrings, etc. Just blows up on breaking package change :-(

Running Sphinx v4.5.0

Exception occurred: File "d:\dev\astro\ascom alpaca\alpycaclient\venv\lib\site-packages\sphinx_toolbox\more_autodoc\typehints.py", line 22 2, in builder_ready = sphinx_autodoc_typehints.builder_ready AttributeError: module 'sphinx_autodoc_typehints' has no attribute 'builder_ready' The full traceback has been saved in C:\Users\ROBERT~1.DEN\AppData\Local\Temp\sphinx-err-bflse5ad.log, if you want to re port the issue to the developers. Please also report this if it was a user error, so that a better error message can be provided next time. A bug report can be filed in the tracker at https://github.com/sphinx-doc/sphinx/issues. Thanks!

How to Reproduce

make html

Expected behavior

[before package updates]

make html Running Sphinx v4.5.0 loading pickled environment... done [autosummary] generating autosummary for: alpaca.camera.rst, alpaca.covercalibrator.rst, alpaca.device.rst, alpaca.disco very.rst, alpaca.dome.rst, alpaca.exceptions.rst, alpaca.filterwheel.rst, alpaca.focuser.rst, alpaca.management.rst, alp aca.observingconditions.rst, ..., alpaca.telescope.rst, alpacaclasses.rst, alpacamodules.rst, camerasample.rst, docinten um.rst, examples.rst, faq.rst, index.rst, introduction.rst, miscellany.rst building [mo]: targets for 0 po files that are out of date building [html]: targets for 0 source files that are out of date updating environment: 0 added, 1 changed, 0 removed reading sources... [100%] alpaca.observingconditions looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] index generating indices... genindex py-modindex done writing additional pages... search done copying static files... done copying extra files... done dumping search index in English (code: en)... done dumping object inventory... done build succeeded.

Your project

https://github.com/BobDenny/alpyca-client/tree/master/docs

Screenshots

No response

OS

Win

Python version

3.7

Sphinx version

4.5.0

Sphinx extensions

autodoc, autosummary, napoleon, autoenum

Extra tools

No response

Additional context

You can see in conf.py which tools I have loaded

AA-Turner commented 2 years ago

You need sphinx_toolbox v3.0.0. Install it with pip install sphinx_toolbox --pre (There is only an alpha release at the moment). A workaround is to downgrade to sphinx-autodoc-typehints v1.14.0 (pip install "sphinx-autodoc-typehints==1.14").

sphinx-autodoc-typehints removed the builder_ready function in v1.15.0 (https://github.com/tox-dev/sphinx-autodoc-typehints/blob/main/CHANGELOG.md#1150, https://github.com/tox-dev/sphinx-autodoc-typehints/commit/27555ddaf655192190a13dd23b705d1e5c1d4c3b)

sphinx_toolbox added a constraint, but only for the v3.0.0 version, currently in alpha (https://sphinx-toolbox.readthedocs.io/en/latest/changelog.html#unreleased, https://github.com/sphinx-toolbox/sphinx-toolbox/commit/f1f501f0548f8311d0788c63402178bfb2e6ac1a)

A