Skip to content

Commit

Permalink
Update import for _pseudo_parse_arglist
Browse files Browse the repository at this point in the history
Although this is a private API, its useful for the lssttasks extension.
We'll need to revisit this if the API does prove to be too unstable to
use in our own purpose.
  • Loading branch information
jonathansick committed Apr 30, 2024
1 parent b6a1c50 commit 7b93031
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelog.d/20240430_155714_jsick_DM_44137.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

- Technotes ignore files in the repository with `.md`, `.rst`, and `.ipynb` extensions if they aren't the index file. Since technotes are single-page documents, only the index file should be used as a source file. This change lets authors include auxillary notebooks with their technotes without having to explicitly exclude them from the technote build process. This is implemented with `technote.conf.extend_excludes_for_non_index_source`.

- In `documenteer.ext.lssttasks`, attempt to import `_pseudo_parse_arglist` from `sphinx.domains.python._annotations` before falling back to the `sphinx.domains.python` module. Ultimately this is a workaround.

### Other changes

- Added `defusedxml` as a dev dependency. This is used by Sphinx's `sphinx.testing.fixtures`, but isn't included as a dependency by Sphinx itself. This change ensures that `defusedxml` is installed when running the tests.
7 changes: 6 additions & 1 deletion src/documenteer/ext/lssttasks/pyapisummary.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
desc_signature,
seealso,
)
from sphinx.domains.python import PyXRefRole, _pseudo_parse_arglist

try:
from sphinx.domains.python._annotations import _pseudo_parse_arglist
except ImportError:
from sphinx.domains.python import _pseudo_parse_arglist
from sphinx.domains.python import PyXRefRole
from sphinx.errors import SphinxError
from sphinx.util.inspect import signature as make_signature
from sphinx.util.inspect import stringify_signature
Expand Down

0 comments on commit 7b93031

Please sign in to comment.