summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-01-10 10:06:07 -0500
committerTim Graham <timograham@gmail.com>2017-01-17 20:52:05 -0500
commitf8473082004ccdc764ad08beeb7c2a17b238dc85 (patch)
tree4c11fc079d8498f4ff315155613c92f4b651b036
parente27e4c03399f610e0db1fb9b881095d762fda2b7 (diff)
Advanced deprecation warnings for Django 2.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 b862a161b2..28405cf2c1 100644
--- a/django/utils/deprecation.py
+++ b/django/utils/deprecation.py
@@ -4,15 +4,15 @@ import inspect
import warnings
-class RemovedInDjango20Warning(DeprecationWarning):
+class RemovedInDjango30Warning(PendingDeprecationWarning):
pass
-class RemovedInDjango21Warning(PendingDeprecationWarning):
+class RemovedInDjango21Warning(DeprecationWarning):
pass
-RemovedInNextVersionWarning = RemovedInDjango20Warning
+RemovedInNextVersionWarning = RemovedInDjango21Warning
class warn_about_renamed_method(object):
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
index 05100c43a9..eface82d4c 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-3.0:
+
+3.0
+---
+
+See the :ref:`Django 2.0 release notes<deprecated-features-2.0>` for more
+details on these changes.
+
.. _deprecation-removed-in-2.1:
2.1
diff --git a/tests/runtests.py b/tests/runtests.py
index a99ebd63c3..82cd8207ba 100755
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -20,12 +20,12 @@ from django.test.utils import get_runner
from django.utils import six
from django.utils._os import upath
from django.utils.deprecation import (
- RemovedInDjango20Warning, RemovedInDjango21Warning,
+ RemovedInDjango21Warning, RemovedInDjango30Warning,
)
from django.utils.log import DEFAULT_LOGGING
# Make deprecation warnings errors to ensure no usage of deprecated features.
-warnings.simplefilter("error", RemovedInDjango20Warning)
+warnings.simplefilter("error", RemovedInDjango30Warning)
warnings.simplefilter("error", RemovedInDjango21Warning)
# Make runtime warning errors to ensure no usage of error prone patterns.
warnings.simplefilter("error", RuntimeWarning)