summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2021-01-14 10:40:19 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-01-14 17:50:04 +0100
commitb4c5f878bd8d8ba4850ab0f1811cc321e5a627ac (patch)
tree6bdd6c1bf344a1f14e4f5d6d85b7b4479380c8e8
parent0aa6a602b2b1cac6fe8e55051eed493b9cea7b81 (diff)
downloaddjango-b4c5f878bd8d8ba4850ab0f1811cc321e5a627ac.tar.gz
Advanced deprecation warnings for Django 4.0.
-rw-r--r--django/utils/deprecation.py6
-rw-r--r--docs/internals/deprecation.txt8
-rwxr-xr-xtests/runtests.py4
3 files changed, 13 insertions, 5 deletions
diff --git a/django/utils/deprecation.py b/django/utils/deprecation.py
index bc715e91d3..05913ab4ba 100644
--- a/django/utils/deprecation.py
+++ b/django/utils/deprecation.py
@@ -5,15 +5,15 @@ import warnings
from asgiref.sync import sync_to_async
-class RemovedInDjango40Warning(DeprecationWarning):
+class RemovedInDjango41Warning(DeprecationWarning):
pass
-class RemovedInDjango41Warning(PendingDeprecationWarning):
+class RemovedInDjango50Warning(PendingDeprecationWarning):
pass
-RemovedInNextVersionWarning = RemovedInDjango40Warning
+RemovedInNextVersionWarning = RemovedInDjango41Warning
class warn_about_renamed_method:
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
index 181dc8e441..4db5d685d7 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 <internal-release-deprecation-policy>`. More details
about each item can often be found in the release notes of two versions prior.
+.. _deprecation-removed-in-5.0:
+
+5.0
+---
+
+See the :ref:`Django 4.0 release notes <deprecated-features-4.0>` for more
+details on these changes.
+
.. _deprecation-removed-in-4.1:
4.1
diff --git a/tests/runtests.py b/tests/runtests.py
index fe5ca44ba6..870711370d 100755
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -25,7 +25,7 @@ else:
from django.test.selenium import SeleniumTestCaseBase
from django.test.utils import NullTimeKeeper, TimeKeeper, get_runner
from django.utils.deprecation import (
- RemovedInDjango40Warning, RemovedInDjango41Warning,
+ RemovedInDjango41Warning, RemovedInDjango50Warning,
)
from django.utils.log import DEFAULT_LOGGING
from django.utils.version import PY37
@@ -39,7 +39,7 @@ else:
warnings.filterwarnings('ignore', r'\(1003, *', category=MySQLdb.Warning)
# Make deprecation warnings errors to ensure no usage of deprecated features.
-warnings.simplefilter("error", RemovedInDjango40Warning)
+warnings.simplefilter('error', RemovedInDjango50Warning)
warnings.simplefilter('error', RemovedInDjango41Warning)
# Make resource and runtime warning errors to ensure no usage of error prone
# patterns.