-
Notifications
You must be signed in to change notification settings - Fork 5
[RFC] Define a public API #25
Copy link
Copy link
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Situation
Whereas...
The project claims to conform to semantic versioning. And the semver spec 2.0 requires that you define a "public API" - changes to which should either rev the major or minor version number depending on if they are backwards compatible or not.
PEP 8 recommends that you use the
__all__module variable to define your public interface.We do not clearly define a public API.
Proposal
Make use of the PEP 8
__all__variable throughout the project to define our public interface.In all submodules, add an
__all__variable that defines what classes and methods within that module are considered "public".In the top-level
rule34Pymodule, import all submodule elements declared in__all__; thereby creating a top-level public interface.Update our project documentation to make our public interface clear.
Update our project policy to require a major version upgrade when changes are merged that break backwards compatibility in the public API, and a minor version change when merging changes that alter the public API in a backwards compatible way.