• 
      

    Update deprecation warning classes and warning catch code.

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

    Information

    Djblets
    release-2.x

    Reviewers

    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.

    Summary ID
    Update deprecation warning classes and warning catch code.
    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.
    e5b331807cd1e1bc2d5976fd7cfec2f81f27144c
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.x (c14f65d)