From 4a461d49c775331ed52418f007974d61be1e06b9 Mon Sep 17 00:00:00 2001
From: Tim Graham <timograham@gmail.com>
Date: Sat, 2 Sep 2017 21:55:59 -0400
Subject: [PATCH] Advanced deprecation warnings for Django 2.1.

---
 django/utils/deprecation.py    | 5 +----
 docs/internals/deprecation.txt | 3 +++
 tests/runtests.py              | 5 +----
 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.