Skip to content

Commit 0de44c7

Browse files
Bump sphinx from 4.3.2 to 5.3.0 (#34)
* Bump sphinx from 4.3.2 to 5.3.0 Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 4.3.2 to 5.3.0. - [Release notes](https://github.com/sphinx-doc/sphinx/releases) - [Changelog](https://github.com/sphinx-doc/sphinx/blob/master/CHANGES) - [Commits](sphinx-doc/sphinx@v4.3.2...v5.3.0) --- updated-dependencies: - dependency-name: sphinx dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Update to sphinx 5 API - Explicitly set the documentation language - remove use of deprecated arguments Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Nick <speedyleion@users.noreply.github.com>
1 parent 8b095d1 commit 0de44c7

File tree

5 files changed

+28
-25
lines changed

5 files changed

+28
-25
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
#
7979
# This is also used if you do content translation via gettext catalogs.
8080
# Usually you set "language" from the command line for these cases.
81-
language = None
81+
language = "en"
8282

8383
# List of patterns, relative to source directory, that match files and
8484
# directories to ignore when looking for source files.

poetry.lock

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ classifiers = [
1919

2020
[tool.poetry.dependencies]
2121
python = "^3.7"
22-
sphinx = "4.3.2"
22+
sphinx = "5.3.0"
2323
clang = "14.0"
2424
beautifulsoup4 = "4.11.1"
2525

src/sphinx_c_autodoc/__init__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,11 @@ def get_compilation_database(self) -> Optional[str]:
286286

287287
return None
288288

289-
def get_doc(self, ignore: int = None) -> Optional[List[List[str]]]:
289+
def get_doc(self) -> Optional[List[List[str]]]:
290290
"""Decode and return lines of the docstring(s) for the object."""
291291
docstring = self.object.get_doc()
292292
tab_width = self.directive.state.document.settings.tab_width
293-
return [prepare_docstring(docstring, ignore, tab_width)]
293+
return [prepare_docstring(docstring, tabsize=tab_width)]
294294

295295
def get_object_members(self, want_all: bool) -> Tuple[bool, List[Tuple[str, Any]]]:
296296
"""Return `(members_check_module, members)` where `members` is a
@@ -422,10 +422,13 @@ def __init__(
422422
"""
423423
super().__init__(directive, name, indent)
424424

425+
# Sphinx 3.1 compatibility. 4.0 deprecated the "reporter" attribute. 5.0 removes it.
426+
reporter = getattr(self.directive, "reporter", None)
427+
425428
self._original_directive = self.directive
426429
self.directive = DocumenterBridge(
427430
self.directive.env,
428-
self.directive.reporter,
431+
reporter,
429432
self.directive.genopt,
430433
self.directive.lineno,
431434
self.directive.state,

tests/assets/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
#
6464
# This is also used if you do content translation via gettext catalogs.
6565
# Usually you set "language" from the command line for these cases.
66-
language = None
66+
language = "en"
6767

6868
# List of patterns, relative to source directory, that match files and
6969
# directories to ignore when looking for source files.

0 commit comments

Comments
 (0)