diff --git a/CHANGES b/CHANGES index c7e781de86..5d31ebcefc 100644 --- a/CHANGES +++ b/CHANGES @@ -25,6 +25,8 @@ Features added Bugs fixed ---------- +* #9608: apidoc: apidoc does not generate a module definition for implicit + namespace package * #9487: autodoc: typehint for cached_property is not shown * #9509: autodoc: AttributeError is raised on failed resolving typehints * #9518: autodoc: autodoc_docstring_signature does not effect to ``__init__()`` diff --git a/sphinx/templates/apidoc/package.rst_t b/sphinx/templates/apidoc/package.rst_t index b7380e8a04..2229c311b4 100644 --- a/sphinx/templates/apidoc/package.rst_t +++ b/sphinx/templates/apidoc/package.rst_t @@ -19,6 +19,10 @@ {{- [pkgname, "package"] | join(" ") | e | heading }} {% endif %} +{%- if is_namespace %} +.. py:module:: {{ pkgname }} +{% endif %} + {%- if modulefirst and not is_namespace %} {{ automodule(pkgname, automodule_options) }} {% endif %}