Skip to content

DOC: Private-looking symbols in the public API? #56874

Open
@twoertwein

Description

@twoertwein

Pandas version checks

  • I have checked that the issue still exists on the latest versions of the docs on main here

Location of the documentation

doc/source/reference/extensions.rst

Documentation problem

doc/source/reference/extensions.rst (and probably some of the other references) documents methods to be public even though they start with a leading _ (which typically is used to indicate private symbols). I know pandas declares that the documentation dictates what is public (as opposed to typical Python conventions) but it seems very confusing to document private-looking symbols as being part of the public API.

xref pandas-dev/pandas-stubs#850

Suggested fix for documentation

It would be good to either

  • remove private-looking symbols from the documentation (if they are actually private), or
  • rename them and deprecate the private-looking name

After that, it would be great to have a script in pre-commit to check for private-looking symbols in the public documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocsExtensionArrayExtending pandas with custom dtypes or arrays.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions