Deprecations¶
Deprecations should be rare before 1.0, but they are still useful when users need a safe migration path away from documented public API or behavior.
What requires deprecation¶
Use a deprecation path for changes to documented public API, especially names
exported from benchmatrix.__init__ or behavior described in tutorials,
how-to guides, or reference documentation.
Deprecation is not required for:
- private modules such as
_schema.py; - private names beginning with
_; - undocumented implementation details;
- behavior that is removed immediately for security or serious correctness reasons.
Timing¶
Before 1.0, deprecated public API should normally remain available until at least
the next minor release. For example, a deprecation introduced in 0.2.0 should
normally remain through the 0.2.x line and may be removed in 0.3.0.
After 1.0, deprecated public API should normally remain available until the next major release unless release notes document a narrower exception.
Deprecation checklist¶
- document the replacement or migration path;
- add tests that preserve the deprecated behavior until removal;
- add a changelog entry;
- include removal timing when known;
- mention the deprecation in release notes;
- avoid deprecating private implementation details that were never supported.
Removal checklist¶
- confirm the changelog mentioned the deprecation;
- confirm the removal timing has arrived or the security/correctness exception applies;
- remove the behavior and tests together;
- update API docs, tutorials, examples, and compatibility notes;
- run
make checkandmake test-matrix.