Use correct class to indicate present deprecation (#8665)

`PendingDeprecationWarning` means "we plan to deprecate, but haven't
yet." A feature that's to be deleted in the next release is not planned
to be deprecated; it **is** deprecated.

> Base class for warnings about features which are obsolete and expected
> to be deprecated in the future, but are not deprecated at the moment.
>
> This class is rarely used as emitting a warning about a possible
> upcoming deprecation is unusual, and DeprecationWarning is preferred for
> already active deprecations.

https://docs.python.org/3/library/exceptions.html#PendingDeprecationWarning

Co-authored-by: Tom Christie <tom@tomchristie.com>
This commit is contained in:
David Cain 2022-09-22 11:07:43 -07:00 committed by GitHub
parent 2da473c8c8
commit 2de5081829
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,5 +29,5 @@ if django.VERSION < (3, 2):
default_app_config = 'rest_framework.apps.RestFrameworkConfig'
class RemovedInDRF315Warning(PendingDeprecationWarning):
class RemovedInDRF315Warning(DeprecationWarning):
pass