Update deprecation warning classes and warning catch code.

Review Request #11929 — Created Jan. 12, 2022 and submitted — Latest diff uploaded

chipx86
Djblets
release-2.x
djblets

Some of our warnings code predated the Djblets-specific deprecation
warning classes, and these made it hard for us to search for
deprecations to remove in new releases. Those have been updated to use
RemovedInDjblets30Warning.

Unit tests have been updated to better check for warnings by using
assertWarns instead of catch_warnings. This slims down the code and
makes the behavior more consistent.

This led to finding one assertion check that was no longer valid, and
some calls to deprecated code that didn't check for deprecation warnings
(which leaked warnings to the test runner). Those have been updated to
catch warnings.

Unit tests pass on all supported versions of Python and Django.

Commits

Files

Loading...