This introduces a new djblets.deprecation
class, which currently
defines DeprecationWarning
subclasses for Djblets, and a utility
function for defining warn-on-access deprecated arguments for functions,
signal handlers, etc. The warnings are the meat of this change, and
include a base class, BaseRemovedInDjbletsVersionWarning
, a
subclass specific to Djblets 2.0, RemovedInDjblets20Warning
, and
an alias for the version-specific warning,
RemovedInNextDjbletsVersionWarning
.
These allow us to specify when exactly a particular feature will be
removed, so it's clear to consumers and so we can easily locate them
when getting ready to remove features. It also helps keep us consistent
with when we actually remove deprecated features.
All current DeprecationWarnings
have been updated to use the 2.0
warning. Some of the messages referred to Djblets 0.9 or 1.0, and we
clearly never got rid of that code for those versions, so those have
been updated to reference 2.0, where they'll actually be removed.