Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #10509: autosummary: autosummary fails with a shared library #10510

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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