summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-09-02 21:55:59 -0400
committerTim Graham <timograham@gmail.com>2017-09-22 12:51:19 -0400
commit4a461d49c775331ed52418f007974d61be1e06b9 (patch)
tree3a4b5d6a96c1fc395fcaa3e263290386f9c81525
parent5446b72003790fc98bd926f7196b26cc5db63c5a (diff)
Advanced deprecation warnings for Django 2.1.
-rw-r--r--django/utils/deprecation.py5
-rw-r--r--docs/internals/deprecation.txt3
-rwxr-xr-xtests/runtests.py5
3 files changed, 5 insertions, 8 deletions
diff --git a/django/utils/deprecation.py b/django/utils/deprecation.py
index cb8b001583..07a7f853a9 100644
--- a/django/utils/deprecation.py
+++ b/django/utils/deprecation.py
@@ -6,13 +6,10 @@ class RemovedInDjango30Warning(PendingDeprecationWarning):
pass
-class RemovedInDjango21Warning(DeprecationWarning):
+class RemovedInNextVersionWarning(DeprecationWarning):
pass
-RemovedInNextVersionWarning = RemovedInDjango21Warning
-
-
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 bc487cece9..1b7d5f73a9 100644
--- a/docs/internals/deprecation.txt
+++ b/docs/internals/deprecation.txt
@@ -29,6 +29,9 @@ details on these changes.
* The ``field_name`` keyword argument of ``QuerySet.earliest()`` and
``latest()`` will be removed.
+See the :ref:`Django 2.1 release notes <deprecated-features-2.1>` for more
+details on these changes.
+
.. _deprecation-removed-in-2.1:
2.1
diff --git a/tests/runtests.py b/tests/runtests.py
index 7f4f1670c5..57b8a45404 100755
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -17,14 +17,11 @@ from django.test import TestCase, TransactionTestCase
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 (
- RemovedInDjango21Warning, RemovedInDjango30Warning,
-)
+from django.utils.deprecation import RemovedInDjango30Warning
from django.utils.log import DEFAULT_LOGGING
# Make deprecation warnings errors to ensure no usage of deprecated features.
warnings.simplefilter("error", RemovedInDjango30Warning)
-warnings.simplefilter("error", RemovedInDjango21Warning)
# Make runtime warning errors to ensure no usage of error prone patterns.
warnings.simplefilter("error", RuntimeWarning)
# Ignore known warnings in test dependencies.