Skip to content

Explicitly declare supported public APIs with '__all__' #1099

Open
@sungwy

Description

@sungwy

Feature Request / Improvement

Currently, we rely on the informal naming conventions (with or without underscore) to distinguish between a public or private API.

It will be helpful to declare the names of public APIs in the __all__ attribute on all our public API supporting modules as it will:

  • control what APIs we expose to wildcard imports
  • enhance discoverability of public APIs (when reading the source code as users or developers)
  • and allow tools like Griffe to detect the correct public APIs for backwards compatibility analysis in our CI

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions