From ebff3a8392f002100d1e71d3deb94f27fb8cc0cf Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 18 Jul 2022 13:58:55 +0200 Subject: [PATCH] docs: fix build with sphinx 5.0 The `no_docstring` argument to `Documenter.add_content()` has been deprecated in Sphinx 3.4.0 and removed in Sphinx 5.0. This will not break compatibility with earlier versions, since the `no_docstring` argument always carried a default value. https://github.com/sphinx-doc/sphinx/blob/v4.2.0/sphinx/ext/autodoc/__init__.py#L601 https://github.com/sphinx-doc/sphinx/blob/v4.5.0/sphinx/ext/autodoc/__init__.py#L596 --- docs/lib/pg3_docs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/lib/pg3_docs.py b/docs/lib/pg3_docs.py index e2609a3ab..05a68762c 100644 --- a/docs/lib/pg3_docs.py +++ b/docs/lib/pg3_docs.py @@ -97,7 +97,7 @@ def monkeypatch_autodoc(): return recovered_classes[self.parent] return orig_attr_get_real_modname(self) - def fixed_attr_add_content(self, more_content, no_docstring=False): + def fixed_attr_add_content(self, more_content): """ Replace a docstring such as:: @@ -119,7 +119,7 @@ def monkeypatch_autodoc(): which creates a more compact representation of a property. """ - orig_attr_add_content(self, more_content, no_docstring) + orig_attr_add_content(self, more_content) if not isinstance(self.object, property): return iret, mret = match_in_lines(r"\s*:rtype: (.*)", self.directive.result) -- 2.47.3