summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-01-17 10:06:02 -0500
committerTim Graham <timograham@gmail.com>2017-01-17 20:52:05 -0500
commit6192bffb130132461e55e5fe7a7eaaa9a166d08f (patch)
tree7f0d9f07379149bd7f11cdd8989827a876425a99
parent98760ab0b2f1ce03234a5e6a52decd9f23d3994a (diff)
Refs #26601 -- Removed obsolete system check for MIDDLEWARE_CLASSES setting.
-rw-r--r--django/core/checks/__init__.py1
-rw-r--r--django/core/checks/compatibility/django_1_10.py17
-rw-r--r--docs/ref/checks.txt3
-rw-r--r--tests/check_framework/tests_1_10_compatibility.py17
4 files changed, 2 insertions, 36 deletions
diff --git a/django/core/checks/__init__.py b/django/core/checks/__init__.py
index 0aa23dbaf4..f2194a3fc9 100644
--- a/django/core/checks/__init__.py
+++ b/django/core/checks/__init__.py
@@ -9,7 +9,6 @@ from .registry import Tags, register, run_checks, tag_exists
# Import these to force registration of checks
import django.core.checks.caches # NOQA isort:skip
-import django.core.checks.compatibility.django_1_10 # NOQA isort:skip
import django.core.checks.database # NOQA isort:skip
import django.core.checks.model_checks # NOQA isort:skip
import django.core.checks.security.base # NOQA isort:skip
diff --git a/django/core/checks/compatibility/django_1_10.py b/django/core/checks/compatibility/django_1_10.py
deleted file mode 100644
index 120ef0b5b1..0000000000
--- a/django/core/checks/compatibility/django_1_10.py
+++ /dev/null
@@ -1,17 +0,0 @@
-from __future__ import unicode_literals
-
-from django.conf import settings
-
-from .. import Tags, Warning, register
-
-
-@register(Tags.compatibility)
-def check_duplicate_middleware_settings(app_configs, **kwargs):
- if settings.MIDDLEWARE is not None and hasattr(settings, 'MIDDLEWARE_CLASSES'):
- return [Warning(
- "The MIDDLEWARE_CLASSES setting is deprecated in Django 1.10 "
- "and the MIDDLEWARE setting takes precedence. Since you've set "
- "MIDDLEWARE, the value of MIDDLEWARE_CLASSES is ignored.",
- id='1_10.W001',
- )]
- return []
diff --git a/docs/ref/checks.txt b/docs/ref/checks.txt
index 51083c5b2b..13ef44053e 100644
--- a/docs/ref/checks.txt
+++ b/docs/ref/checks.txt
@@ -116,7 +116,8 @@ that might occur as a result of a version upgrade.
in Django 2.0*.
* **1_10.W001**: The ``MIDDLEWARE_CLASSES`` setting is deprecated in Django
1.10 and the :setting:`MIDDLEWARE` setting takes precedence. Since you've
- set ``MIDDLEWARE``, the value of ``MIDDLEWARE_CLASSES`` is ignored.
+ set ``MIDDLEWARE``, the value of ``MIDDLEWARE_CLASSES`` is ignored. *This
+ check was removed in Django 2.0*.
Caches
------
diff --git a/tests/check_framework/tests_1_10_compatibility.py b/tests/check_framework/tests_1_10_compatibility.py
deleted file mode 100644
index 388ac1b024..0000000000
--- a/tests/check_framework/tests_1_10_compatibility.py
+++ /dev/null
@@ -1,17 +0,0 @@
-from django.core.checks.compatibility.django_1_10 import \
- check_duplicate_middleware_settings
-from django.test import SimpleTestCase
-from django.test.utils import override_settings
-
-
-class CheckDuplicateMiddlwareSettingsTest(SimpleTestCase):
-
- @override_settings(MIDDLEWARE=[], MIDDLEWARE_CLASSES=['django.middleware.common.CommonMiddleware'])
- def test_duplicate_setting(self):
- result = check_duplicate_middleware_settings(None)
- self.assertEqual(result[0].id, '1_10.W001')
-
- @override_settings(MIDDLEWARE=None)
- def test_middleware_not_defined(self):
- result = check_duplicate_middleware_settings(None)
- self.assertEqual(len(result), 0)