summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2024-12-13 10:24:05 +0100
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2025-01-15 22:28:37 +0100
commit7bc88c3c15dcc3aa38702f298845a97618b1932b (patch)
tree5d454418a587a049493a1346ad859a90f1c9ccb9
parent17ae61a5d4ec75ac5e40363cc76b04c191b50d3d (diff)
Advanced deprecation warnings for Django 6.0.
-rw-r--r--django/utils/deprecation.py8
-rw-r--r--docs/internals/deprecation.txt8
-rwxr-xr-xtests/runtests.py4
3 files changed, 14 insertions, 6 deletions
diff --git a/django/utils/deprecation.py b/django/utils/deprecation.py
index d690dc5d56..6f3852cc04 100644
--- a/django/utils/deprecation.py
+++ b/django/utils/deprecation.py
@@ -4,16 +4,16 @@ import warnings
from asgiref.sync import iscoroutinefunction, markcoroutinefunction, sync_to_async
-class RemovedInDjango60Warning(DeprecationWarning):
+class RemovedInDjango61Warning(DeprecationWarning):
pass
-class RemovedInDjango61Warning(PendingDeprecationWarning):
+class RemovedInDjango70Warning(PendingDeprecationWarning):
pass
-RemovedInNextVersionWarning = RemovedInDjango60Warning
-RemovedAfterNextVersionWarning = RemovedInDjango61Warning
+RemovedInNextVersionWarning = RemovedInDjango61Warning
+RemovedAfterNextVersionWarning = RemovedInDjango70Warning
class warn_about_renamed_method:
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
index 71e4e19cd8..e29c554f95 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-7.0:
+
+7.0
+---
+
+See the :ref:`Django 6.0 release notes <deprecated-features-6.0>` for more
+details on these changes.
+
.. _deprecation-removed-in-6.1:
6.1
diff --git a/tests/runtests.py b/tests/runtests.py
index 57d4fcea72..adf9e1bc29 100755
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -29,8 +29,8 @@ else:
from django.test.selenium import SeleniumTestCase, SeleniumTestCaseBase
from django.test.utils import NullTimeKeeper, TimeKeeper, get_runner
from django.utils.deprecation import (
- RemovedInDjango60Warning,
RemovedInDjango61Warning,
+ RemovedInDjango70Warning,
)
from django.utils.functional import classproperty
from django.utils.log import DEFAULT_LOGGING
@@ -46,7 +46,7 @@ else:
warnings.filterwarnings("ignore", r"\(1003, *", category=MySQLdb.Warning)
# Make deprecation warnings errors to ensure no usage of deprecated features.
-warnings.simplefilter("error", RemovedInDjango60Warning)
+warnings.simplefilter("error", RemovedInDjango70Warning)
warnings.simplefilter("error", RemovedInDjango61Warning)
# Make resource and runtime warning errors to ensure no usage of error prone
# patterns.