Skip to content

Autosummary should respect :meta public: and :meta private: #8700

Open

Description

@xuhdev

Is your feature request related to a problem? Please describe.

Currently autodoc allows inserting :meta private: as a way to declare a function private: https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html

However, autosummary does not do so.

Describe the solution you'd like

In autosummary, functions currently:

List containing names of “public” functions in the module. Here, “public” here means that the name does not start with an underscore. Only available for modules.

If the bold part can be changed to does not start with an underscore and does not have :meta: private, the issue should be resolved.

Describe alternatives you've considered

Customize the autosummary template to exclude each single function that I would like to exclude. Quite tedious though.

Activity

  1. added
    type:enhancement
    on Jan 18, 2021
  2. added this to the 3.5.0 milestone on Jan 18, 2021
  3. modified the milestones: 3.5.0, 4.0.0 on Feb 14, 2021
  4. modified the milestones: 4.0.0, 4.1.0 on Apr 11, 2021
  5. modified the milestones: 4.1.0, 4.2.0 on Jul 10, 2021
  6. modified the milestones: 4.2.0, 4.3.0 on Sep 12, 2021
  7. modified the milestones: 4.3.0, 4.4.0 on Nov 8, 2021
  8. modified the milestones: 4.4.0, 4.5.0 on Jan 15, 2022
  9. modified the milestones: 4.5.0, 5.0.0 on Mar 27, 2022
  10. modified the milestones: 5.0.0, 5.x on May 2, 2022
  11. modified the milestones: 5.x, 6.x on Oct 4, 2022
  12. modified the milestones: 6.x, 7.x on Apr 29, 2023
  13. modified the milestones: 7.x, 8.x on Jul 20, 2024
  14. jdillard commented on Aug 6, 2026

    @jdillard
    SponsorMember

    I consolidated #8922 into this issue because both have the same underlying cause, which is that autosummary does not inspect docstring metadata when constructing its public template member lists.

    The combined scope should cover both directions:

    A single PR should address both behaviors.

  15. changed the title [-]Let autosummary respect `:meta private:`[/-] [+]Autosummary should respect `:meta public:` and `:meta private:`[/+] on Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    extensions:autosummarytype:enhancement

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions