-
-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'autodoc-process-docstring' threw an exception (exception: The frontend.OptionParser class will be replaced by a subclass of argparse.ArgumentParser in Docutils 0.21 or later.) #454
Comments
Just hit this one too. docutils v0.21.2. It wasn't obvious what triggers it, since it worked in one project but failed in a very similar one. So an immediate workaround is to add a |
This is a workaround for tox-dev/sphinx-autodoc-typehints#454.
This is a workaround for tox-dev/sphinx-autodoc-typehints#454.
The warning was added 2 years ago: docutils/docutils@6548b56#diff-d1f841500d12a20b000229849c98cd38d8fe4d0ab5a149119244931969ee82e3R659. It seems like there was a plan to replace it with a class inheriting @gaborbernat I think that this extension should just suppress the warning. It looks like there's no other way. WDYT? |
Meanwhile, I've filled out the complaint form at https://sourceforge.net/p/docutils/bugs/496/. |
The upstream suggested the following: - from docutils.frontend import OptionParser
+ from docutils.frontend import get_default_settings - settings = OptionParser(components=(RSTParser,)).get_default_values()
+ settings = get_default_settings(RSTParser) |
Hopefully, #507 is enough. |
* A deprecation warning in docutils surfaces through sphinx-autodoc-typehints. A workaround was submitted to sphinx-autodoc-typehints but that workaround/fix is not yet in a release version. More background info can be found here tox-dev/sphinx-autodoc-typehints#454
* A deprecation warning in docutils surfaces through sphinx-autodoc-typehints. A workaround was submitted to sphinx-autodoc-typehints but that workaround/fix is not yet in a release version. More background info can be found here tox-dev/sphinx-autodoc-typehints#454
I've encountered this exception using the current
docutils-0.20.1
It looks similar to #450 and I think it might be fix-able by updating
src/sphinx_autodoc_typehints/__init__.py
and importing and usingargparse.ArgumentParser
instead as indicated, but haven't been able to reconciledocutils.frontend.OptionParser
class withargparse.ArgumentParser
.The text was updated successfully, but these errors were encountered: