diff --git a/CHANGES b/CHANGES index 935b687097..56d63a3142 100644 --- a/CHANGES +++ b/CHANGES @@ -35,6 +35,8 @@ Bugs fixed * #9568: autosummary: summarise overlined sectioned headings correctly * #9600: autosummary: Type annotations which contain commas in autosummary table are not removed completely +* #9608: apidoc: apidoc does not generate a module definition for implicit + namespace package * #9481: c domain: some warnings contain non-existing filenames * #9481: cpp domain: some warnings contain non-existing filenames * #9456: html search: abbreation marks are inserted to the search result if 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 %}