Add classes for warning on deprecations.

Review Request #12217 — Created March 30, 2022 and submitted

Information

Django Evolution
release-2.x

Reviewers

This introduces a new django_evolution.deprecation module, which
contains utility classes that warn about usage of deprecated
functionality. This includes the following stable classes:

  • BaseRemovedInDjangoEvolutionWarning: Base class for all deprecation
    warnings.

  • RemovedInNextDjangoEvolutionWarning: Indicates removal in the next
    major version of Django Evolution.

And version-specific classes, which are current as of Django Evolution
2.2 but will be added to and removed as needed:

  • RemovedInDjangoEvolution30Warning: Deprecation warning for features
    scheduled to be removed in Django Evolution 3.0.

  • RemovedInDjangoEvolution40Warning: Deprecation warning for features
    scheduled to be removed in Django Evolution 4.0.

RemovedInNextDjangoEvolutionWarning currently maps to
`RemovedInDjangoEvolution30Warning.

As of this change, there are no features flagged for deprecation, but
an upcoming change will begin to introduce deprecations.

Made use of this in an upcoming change.

Summary ID
Add classes for warning on deprecations.
This introduces a new `django_evolution.deprecation` module, which contains utility classes that warn about usage of deprecated functionality. This includes the following stable classes: * `BaseRemovedInDjangoEvolutionWarning`: Base class for all deprecation warnings. * `RemovedInNextDjangoEvolutionWarning`: Indicates removal in the next major version of Django Evolution. And version-specific classes, which are current as of Django Evolution 2.2 but will be added to and removed as needed: * `RemovedInDjangoEvolution30Warning`: Deprecation warning for features scheduled to be removed in Django Evolution 3.0. * `RemovedInDjangoEvolution40Warning`: Deprecation warning for features scheduled to be removed in Django Evolution 4.0. `RemovedInNextDjangoEvolutionWarning` currently maps to `RemovedInDjangoEvolution30Warning. As of this change, there are no features flagged for deprecation, but an upcoming change will begin to introduce deprecations.
ad35e88b3ecfd78de035b02e17e2ebb5246a571d
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.x (32a4da8)