diff --git a/CHANGES b/CHANGES index 2dbb9ae7c5b..d4f171f70c3 100644 --- a/CHANGES +++ b/CHANGES @@ -37,6 +37,7 @@ Features added Bugs fixed ---------- +* #10509: autosummary: autosummary fails with a shared library * #10498: gettext: TypeError is raised when sorting warning messages if a node has no line number * #10493: html theme: :rst:dir:`topic` directive is rendered incorrectly with diff --git a/sphinx/ext/autosummary/generate.py b/sphinx/ext/autosummary/generate.py index 5ef7b0352fd..3db7eb989a1 100644 --- a/sphinx/ext/autosummary/generate.py +++ b/sphinx/ext/autosummary/generate.py @@ -155,8 +155,12 @@ def is_skipped(self, name: str, value: Any, objtype: str) -> bool: def scan(self, imported_members: bool) -> List[str]: members = [] - analyzer = ModuleAnalyzer.for_module(self.object.__name__) - attr_docs = analyzer.find_attr_docs() + try: + analyzer = ModuleAnalyzer.for_module(self.object.__name__) + attr_docs = analyzer.find_attr_docs() + except PycodeError: + attr_docs = {} + for name in members_of(self.object, self.app.config): try: value = safe_getattr(self.object, name)