Skip to content

API with a leading underscore #58

@encukou

Description

@encukou

PEP 689 clarified the meaning of the leading underscore in names:

C API named with a leading underscore, as well as API only available with Py_BUILD_CORE, will be considered internal. This means:

  • It may change or be removed without notice in minor releases (3.x.0, including Alpha and Beta releases of 3.x.0). API changes in patch releases or Release Candidates should only be done if absolutely necessary.
  • It should be documented in source comments or Devguide only, not in the public documentation.
  • API introduced before Python 3.12 that is documented or widely used externally should be moved to the Unstable tier as explained above.

As the last point suggests, there is a lot of pre-existing API with a leading underscore, added when the rules were less clear (i.e. the underscore served as a vague warning). It is unfair to users to change or remove this API. (We can do this, as per PEP 387, but that doesn't necessarily mean that we should.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    theme: legacyproblems arising from past decisions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions