summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2025-09-05 14:40:15 -0400
committernessita <124304+nessita@users.noreply.github.com>2025-09-17 15:17:05 -0300
commitcebbd5a6ad6b065ee2ea89fe7ded544b0bf48d12 (patch)
tree78fe463a1378cd29a65ba49fb30a7847214f028e
parentb83204a06e2a4b01f8580b5452058729786ee1d5 (diff)
Advanced deprecation warnings for Django 6.1.
-rw-r--r--django/utils/deprecation.py3
-rw-r--r--docs/internals/deprecation.txt5
-rwxr-xr-xtests/runtests.py6
3 files changed, 7 insertions, 7 deletions
diff --git a/django/utils/deprecation.py b/django/utils/deprecation.py
index 376eb33fae..b10fb58c65 100644
--- a/django/utils/deprecation.py
+++ b/django/utils/deprecation.py
@@ -18,7 +18,7 @@ def django_file_prefixes():
return (os.path.dirname(file),)
-class RemovedInDjango61Warning(DeprecationWarning):
+class RemovedInNextVersionWarning(DeprecationWarning):
pass
@@ -26,7 +26,6 @@ class RemovedInDjango70Warning(PendingDeprecationWarning):
pass
-RemovedInNextVersionWarning = RemovedInDjango61Warning
RemovedAfterNextVersionWarning = RemovedInDjango70Warning
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
index 99887005c3..f2a6e9b545 100644
--- a/docs/internals/deprecation.txt
+++ b/docs/internals/deprecation.txt
@@ -53,6 +53,11 @@ details on these changes.
* The ``django.core.mail.forbid_multi_line_headers()`` and
``django.core.mail.message.sanitize_address()`` functions will be removed.
+See the :ref:`Django 6.1 release notes <deprecated-features-6.1>` for more
+details on these changes.
+
+* ...
+
.. _deprecation-removed-in-6.1:
6.1
diff --git a/tests/runtests.py b/tests/runtests.py
index 679f5269ca..ccfc3279ff 100755
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -28,10 +28,7 @@ else:
from django.test.runner import get_max_test_processes, parallel_type
from django.test.selenium import SeleniumTestCase, SeleniumTestCaseBase
from django.test.utils import NullTimeKeeper, TimeKeeper, get_runner
- from django.utils.deprecation import (
- RemovedInDjango61Warning,
- RemovedInDjango70Warning,
- )
+ from django.utils.deprecation import RemovedInDjango70Warning
from django.utils.functional import classproperty
from django.utils.log import DEFAULT_LOGGING
from django.utils.version import PYPY
@@ -47,7 +44,6 @@ else:
# Make deprecation warnings errors to ensure no usage of deprecated features.
warnings.simplefilter("error", RemovedInDjango70Warning)
-warnings.simplefilter("error", RemovedInDjango61Warning)
# Make resource and runtime warning errors to ensure no usage of error prone
# patterns.
warnings.simplefilter("error", ResourceWarning)