diff --git a/django/utils/deprecation.py b/django/utils/deprecation.py index 6336558a81..3582fcf3a3 100644 --- a/django/utils/deprecation.py +++ b/django/utils/deprecation.py @@ -5,14 +5,17 @@ import warnings from asgiref.sync import sync_to_async -class RemovedInNextVersionWarning(DeprecationWarning): +class RemovedInDjango40Warning(DeprecationWarning): pass -class RemovedInDjango40Warning(PendingDeprecationWarning): +class RemovedInDjango41Warning(PendingDeprecationWarning): pass +RemovedInNextVersionWarning = RemovedInDjango40Warning + + class warn_about_renamed_method: def __init__(self, class_name, old_method_name, new_method_name, deprecation_warning): self.class_name = class_name diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index 074345ef40..e48356bed1 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -7,6 +7,14 @@ in a backward incompatible way, following their deprecation, as per the :ref:`deprecation policy `. More details about each item can often be found in the release notes of two versions prior. +.. _deprecation-removed-in-4.1: + +4.1 +--- + +See the :ref:`Django 3.2 release notes ` for more +details on these changes. + .. _deprecation-removed-in-4.0: 4.0 diff --git a/tests/runtests.py b/tests/runtests.py index 8264d40684..d79b4b393e 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -24,7 +24,9 @@ else: from django.test.runner import default_test_processes from django.test.selenium import SeleniumTestCaseBase from django.test.utils import get_runner - from django.utils.deprecation import RemovedInDjango40Warning + from django.utils.deprecation import ( + RemovedInDjango40Warning, RemovedInDjango41Warning, + ) from django.utils.log import DEFAULT_LOGGING from django.utils.version import PY37 @@ -38,6 +40,7 @@ else: # Make deprecation warnings errors to ensure no usage of deprecated features. warnings.simplefilter("error", RemovedInDjango40Warning) +warnings.simplefilter('error', RemovedInDjango41Warning) # Make resource and runtime warning errors to ensure no usage of error prone # patterns. warnings.simplefilter("error", ResourceWarning)