Skip to content

Commit

Permalink
Use correct class to indicate present deprecation (#8665)
Browse files Browse the repository at this point in the history
`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 <[email protected]>
  • Loading branch information
DavidCain and tomchristie authored Sep 22, 2022
1 parent 2da473c commit 2de5081
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest_framework/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
default_app_config = 'rest_framework.apps.RestFrameworkConfig'


class RemovedInDRF315Warning(PendingDeprecationWarning):
class RemovedInDRF315Warning(DeprecationWarning):
pass

0 comments on commit 2de5081

Please sign in to comment.