sphinx-doc / sphinx-argparse

A Sphinx extension to automatically document argparse commands and options
https://sphinx-argparse.readthedocs.org/
MIT License
29 stars 25 forks source link

v0.5.0: Could not import extension sphinxarg.ext (exception: cannot import name 'get_default_settings' from 'docutils.frontend' #57

Closed fmigneault closed 2 months ago

fmigneault commented 2 months ago

https://github.com/crim-ca/weaver/actions/runs/9948054780/job/27481903248

Extension error:
Could not import extension sphinxarg.ext (exception: cannot import name 'get_default_settings' from 'docutils.frontend' (/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/docutils/frontend.py))

with

docutils==0.18.1
Sphinx==7.3.7
sphinx-argparse==0.5.0
sphinx-autoapi==3.1.2
sphinx-autodoc-typehints==2.2.2
sphinx-paramlinks==0.6.0
sphinx-rtd-theme==1.3.0
sphinxcontrib-applehelp==1.0.8
sphinxcontrib-devhelp==1.0.6
sphinxcontrib-htmlhelp==2.0.5
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.7
sphinxcontrib-redoc==1.6.0
sphinxcontrib-serializinghtml==1.1.10

The docutils<0.19 is enforced by an older version from sphinx-rtd-theme==1.3.0. Since sphinx-rtd-theme==2.0.0 was just released, I expect some flaky compatibility with many of those cross-dependencies. I must pin older versions until everything is resolved everywhere. Therefore, sphinx-argparse<0.5.0 must also be set in the meantime, unless older docutils get handled accordingly.

AA-Turner commented 2 months ago

Ahh -- the function was added in Docutils 0.19, not 0.18 as they document. Fixed in a1621bc8b4abbd598df82038b67d9ae3f479308b.

A

AA-Turner commented 2 months ago

I have released sphinx-argparse v0.5.1 with a fix.

A