Skip to content

Commit

Permalink
Merge pull request #231 from lsst-sqre/tickets/DM-46777/backport-sphi…
Browse files Browse the repository at this point in the history
…nx-pin

DM-46777: sphinx < 8.1.0
  • Loading branch information
fajpunk authored Oct 10, 2024
2 parents 8d2bb24 + 6e23b31 commit 2a9c468
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions changelog.d/20241010_133336_danfuchs_mermaid_compat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
### Bug fixes

- Pin `sphinx` to < 8.1.0. [Sphinx 8.1.0](https://github.com/sphinx-doc/sphinx/compare/v8.0.2...v8.1.0) contains [a commit](https://github.com/sphinx-doc/sphinx/pull/12762/files#diff-a4c6bf1492ef480b94af82c988f64ca56fa256fab0ed043a5ad3d4043f89a645L14) that removes the `ExtensionError` export from the `sphinx.util` package. This currently breaks the [sphinxcontrib-mermaid](https://github.com/mgaitan/sphinxcontrib-mermaid) dependency.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ requires-python = ">=3.11"
dynamic = ["version"]
dependencies = [
"docutils>=0.20", # solves an extra div bug with the bibliography directive
"Sphinx>=7", # Consistent docutils constraint
"Sphinx>=7,<8.1.0", # Consistent docutils constraint, mermaid compatibility
"PyYAML",
"GitPython",
"requests",
Expand Down
6 changes: 5 additions & 1 deletion src/documenteer/stackdocs/doxygen.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,11 @@ def render(self) -> str:
self._render_path_list(lines, tag_name, value)
elif tag_field.type == List[str]:
self._render_str_list(lines, tag_name, value)
elif tag_field.type == Path or tag_field.type == Optional[Path]:
elif (
tag_field.type == Path
or tag_field.type
== Optional[Path] # type: ignore[comparison-overlap]
):
self._render_path(lines, tag_name, value)
return "\n".join(lines) + "\n"

Expand Down

0 comments on commit 2a9c468

Please sign in to comment.