Open askrix opened 2 years ago
ping @anntzer as this might be related to the new stack impl for napolean?
In the general case, I've never heard of multipledispatch
before and I don't know what it does -- the code for autodoc is already a behemoth and incredibly complicated, and I worry that adding support for what seems a little-used library / design pattern would add to that complexity.
Please do submit a PR that passes tests though, from what you've said it may be a minor change.
A
I can have a look, but that would require a minimal repro example (a module to be autodoc'ed and a sphinx project).
Agree. @askrix perhaps we can distinguish the feature request and bug report -- please could you open a (failing) PR with a patch against autodoc and a mininal reproducer?
Please then cross-link it in this issue.
A
Sphinx already provides app.add_autodocumenter()
API to enhance autodoc from extension. So it's better to create your own extension to support multipledispatch.
I also have the same error message when sphinx is upgrade from 5.0.2 to 5.1.0
Is your feature request related to a problem? Please describe. In my project, I am relying on
multipledispatch
library to allow for multiple dispatching of functions. Following the closed feature request forautodoc
to support single dispatch functions and methods, I called uponfind . -type f -exec grep -F 'singledispatch' /def/null {} +
in the console inside the root folder. Thus, I got the exact places to add my code snippets:sphinx/util/inspect.py
, lines 281 and 292sphinx/ext/autodoc/__init__.py
, lines 1314 and 2201Having added the analogous code snippets for
multipledispatch
, I recompiled Sphinx, but got the error message ofAttached, you will find the changed files. Using the command with the additional option,
make html SPHINXOPTS=-v
, I successfully extract the full trace back:Please let me know what I am missing to make it work. Currently, I have no idea what the cause of the error might be.
Thanks in advance and have yourself an epic day! Sphinx_multidispatch.zip