| 1 |
""" |
| 2 |
Warning classes used to flag features that are scheduled for removal. |
| 3 |
|
| 4 |
Each `RemovedInDRF3XXWarning` class is named after the release that removes |
| 5 |
the feature it flags, so `RemovedInDRF320Warning` marks an API that will stop |
| 6 |
working in DRF 3.20. |
| 7 |
|
| 8 |
New deprecations target the release after next, and therefore start out as a |
| 9 |
`PendingDeprecationWarning`, which is silent by default. One release later, |
| 10 |
they are escalated to a `DeprecationWarning`, before being removed in the |
| 11 |
following release. See the deprecation policy for the full timeline: |
| 12 |
https://www.django-rest-framework.org/community/release-notes/#deprecation-policy |
| 13 |
""" |
| 14 |
|
| 15 |
|
| 16 |
class RemovedInDRF319Warning(DeprecationWarning): |
| 17 |
pass |
| 18 |
|
| 19 |
|
| 20 |
class RemovedInDRF320Warning(PendingDeprecationWarning): |
| 21 |
pass |
| 22 |
|
| 23 |
|
| 24 |
# Aliases that always track the current release cycle, so that projects can |
| 25 |
# filter on them without editing their configuration on every DRF release. |
| 26 |
RemovedInNextDRFVersionWarning = RemovedInDRF319Warning |
| 27 |
RemovedAfterNextDRFVersionWarning = RemovedInDRF320Warning |