Skip to content

Commit

Permalink
Fix #10509: autosummary: autosummary fails with a shared library
Browse files Browse the repository at this point in the history
  • Loading branch information
tk0miya committed Jun 2, 2022
1 parent ab58bba commit ce345a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES
Expand Up @@ -16,6 +16,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
Expand Down
8 changes: 6 additions & 2 deletions sphinx/ext/autosummary/generate.py
Expand Up @@ -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)
Expand Down

0 comments on commit ce345a2

Please sign in to comment.