housekeeping/base.py (Diff revision 1)Show all issues
Review Request #13011 — Created May 4, 2023 and submitted
Housekeeping is a Python package designed to make it easy for projects
to mark consumed code as deprecated or pending deprecation, with helpful
instructions for consumers using deprecated functionality.
It's built with the lessons we learned in Review Board, Djblets, and
There are two categories of warnings:
Deprecation warnings, which mark code as being deprecated and
scheduled for removal in a specific upcoming version.
Pending deprecation warnings, which mark code as being available but
scheduled to be deprecated in an unknown future version. Projects
should later transition these to full deprecation warnings.
Deprecation warnings are backed by
pending deprecation warnings are backed by
Projects should subclass these to make their own base classes, filling
product field to specify their project's name. Subclasses of
their "removed in" deprecation warning class should then be created for
any versions in which functionality will be deprecated.
These classes can be passed to any Housekeeping function. Suitable
deprecation messages will be generated automatically.
Projects can also emit deprecation warnings themselves through the
.warn() function on the class.
This change introduces the base packaging, development setup, and base
warning classes. Upcoming changes will introduce deprecation helpers
that work with these classes.
Tested packaging and installing.
Tested with in-progress deprecation helpers.
Viewed the README in a GitHub-compatible Markdown viewer.
Removed some imports that weren't intended to be part of the change.
Revision 2 (+624)
|README.md (Diff revision 2)|
This line needs to be wrapped.