Allow Djblets's deprecation support to be used in other products.

Review Request #12813 — Created Jan. 26, 2023 and submitted

Information

Djblets
release-3.x

Reviewers

Djblets has a lot of useful deprecation code, from the warning classes
to the argument checkers, which currently all explicitly specify
"Djblets" in any messages.

These are now built to be consumed. A new
BaseRemovedInProductVersionWarning class has been added, which
contains the base warning code, and introduces a product field.
BaseRemovedInDjbletsVersionWarning now subclasses this, filling in
product.

Both deprecated_arg_value() and deprecate_non_keyword_only_args()
can be used by consumers along with the new base class.

Unit tests passed.

Made use of the new deprecation abilities in Review Board.

Summary ID
Allow Djblets's deprecation support to be used in other products.
Djblets has a lot of useful deprecation code, from the warning classes to the argument checkers, which currently all explicitly specify "Djblets" in any messages. These are now built to be consumed. A new `BaseRemovedInProductVersionWarning` class has been added, which contains the base warning code, and introduces a `product` field. `BaseRemovedInDjbletsVersionWarning` now subclasses this, filling in `product`. Both `deprecated_arg_value()` and `deprecate_non_keyword_only_args()` can be used by consumers along with the new base class.
3246d9ced6b75c96220527b4bd93e22d100bf96c
maubin
  1. Ship It!
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.x (066be07)