diff --git a/CHANGES b/CHANGES index 03d46c0a293..5b4b7aa7412 100644 --- a/CHANGES +++ b/CHANGES @@ -17,6 +17,8 @@ Bugs fixed ---------- * #8372: autodoc: autoclass directive became slower than Sphinx-3.2 +* #7727: autosummary: raise PycodeError when documenting python package + without __init__.py * #8364: C, properly initialize attributes in empty symbols. Testing diff --git a/sphinx/ext/autosummary/__init__.py b/sphinx/ext/autosummary/__init__.py index 739636d7e13..75f53e738e1 100644 --- a/sphinx/ext/autosummary/__init__.py +++ b/sphinx/ext/autosummary/__init__.py @@ -691,7 +691,7 @@ def import_ivar_by_name(name: str, prefixes: List[str] = [None]) -> Tuple[str, A analyzer = ModuleAnalyzer.for_module(modname) if (qualname, attr) in analyzer.find_attr_docs(): return real_name + "." + attr, INSTANCEATTR, obj, modname - except (ImportError, ValueError): + except (ImportError, ValueError, PycodeError): pass raise ImportError