You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using autodoc_preserve_defaults and a module that defines a partial, I get the following warning from sphinx-build:
WARNING: error while formatting arguments for example_package.example_partial: Handler <function update_defvalue at 0x102f24310> for event 'autodoc-before-process-signature' threw an exception (exception: module, class, method, function, traceback, frame, or code object was expected, got partial).
Describe the bug
When using
autodoc_preserve_defaults
and a module that defines apartial
, I get the following warning fromsphinx-build
:I don't get this warning in Sphinx 4.2.0.
How to Reproduce
I re-used an example repo from an earlier issue: https://github.com/bhrutledge/sphinx-requests-typehints, which includes setup instructions. The rendered docs show the current behavior with Sphinx 4.2.0.
On that repo, I created a PR with Sphinx 4.3.0, where the rendered docs show the missing
partial
signature.I also opened PR with Sphinx 4.3.0 but not
autodoc_preserve_defaults
. The rendered docs show the restoredpartial
signature, but the default arguments are less useful.Expected behavior
I expect Sphinx 4.3.0 to generate the same documentation as 4.2.0 without errors.
Your project
https://github.com/bhrutledge/sphinx-requests-typehints
Screenshots
No response
OS
Mac
Python version
3.9.7
Sphinx version
4.3.0
Sphinx extensions
sphinx.ext.autodoc
Extra tools
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: