summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-06-22 13:54:35 -0400
committerTim Graham <timograham@gmail.com>2015-06-24 16:08:20 -0400
commitaaacaeb0963c406c4fe6f68c6ae51f4a65878250 (patch)
treeb100c6ffc345f12342243a8ac684a692b26a9357
parente73842a95fb751f89a8cafc861bfd57d034cd116 (diff)
Renamed RemovedInDjangoXYWarnings for new roadmap.
Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
-rw-r--r--django/conf/__init__.py6
-rw-r--r--django/conf/urls/__init__.py19
-rw-r--r--django/conf/urls/i18n.py6
-rw-r--r--django/contrib/admin/helpers.py6
-rw-r--r--django/contrib/auth/tests/utils.py4
-rw-r--r--django/contrib/auth/views.py6
-rw-r--r--django/contrib/contenttypes/models.py4
-rw-r--r--django/contrib/gis/db/models/manager.py4
-rw-r--r--django/contrib/gis/db/models/query.py14
-rw-r--r--django/contrib/gis/db/models/sql/aggregates.py2
-rw-r--r--django/contrib/webdesign/__init__.py6
-rw-r--r--django/core/context_processors.py4
-rw-r--r--django/core/files/storage.py6
-rw-r--r--django/core/handlers/base.py6
-rw-r--r--django/core/management/base.py10
-rw-r--r--django/core/management/commands/migrate.py4
-rw-r--r--django/core/urlresolvers.py4
-rw-r--r--django/db/backends/base/operations.py4
-rw-r--r--django/db/backends/mysql/base.py6
-rw-r--r--django/db/backends/oracle/base.py4
-rw-r--r--django/db/backends/sqlite3/base.py6
-rw-r--r--django/db/models/aggregates.py2
-rw-r--r--django/db/models/fields/__init__.py4
-rw-r--r--django/db/models/fields/files.py6
-rw-r--r--django/db/models/fields/related.py8
-rw-r--r--django/db/models/fields/subclassing.py4
-rw-r--r--django/db/models/options.py8
-rw-r--r--django/db/models/sql/aggregates.py4
-rw-r--r--django/db/models/sql/compiler.py4
-rw-r--r--django/db/models/sql/query.py12
-rw-r--r--django/db/utils.py6
-rw-r--r--django/dispatch/dispatcher.py4
-rw-r--r--django/forms/extras/__init__.py4
-rw-r--r--django/forms/fields.py6
-rw-r--r--django/shortcuts.py6
-rw-r--r--django/template/__init__.py2
-rw-r--r--django/template/backends/django.py8
-rw-r--r--django/template/base.py4
-rw-r--r--django/template/context.py6
-rw-r--r--django/template/defaultfilters.py6
-rw-r--r--django/template/defaulttags.py12
-rw-r--r--django/template/engine.py18
-rw-r--r--django/template/library.py4
-rw-r--r--django/template/loader.py10
-rw-r--r--django/template/loader_tags.py2
-rw-r--r--django/template/loaders/base.py15
-rw-r--r--django/template/loaders/cached.py14
-rw-r--r--django/template/loaders/eggs.py4
-rw-r--r--django/template/loaders/filesystem.py4
-rw-r--r--django/template/loaders/locmem.py4
-rw-r--r--django/template/response.py14
-rw-r--r--django/template/smartif.py8
-rw-r--r--django/template/utils.py6
-rw-r--r--django/templatetags/future.py10
-rw-r--r--django/test/testcases.py10
-rw-r--r--django/utils/checksums.py6
-rw-r--r--django/utils/deprecation.py6
-rw-r--r--django/utils/feedgenerator.py6
-rw-r--r--django/utils/html.py6
-rw-r--r--django/views/generic/edit.py10
-rw-r--r--docs/internals/deprecation.txt10
-rw-r--r--docs/ref/class-based-views/mixins-editing.txt4
-rw-r--r--docs/ref/forms/fields.txt2
-rw-r--r--docs/ref/models/meta.txt2
-rw-r--r--docs/ref/settings.txt2
-rw-r--r--docs/ref/templates/builtins.txt6
-rw-r--r--docs/ref/templates/upgrading.txt2
-rw-r--r--docs/ref/urls.txt8
-rw-r--r--docs/releases/1.8.3.txt5
-rw-r--r--docs/releases/1.8.txt44
-rw-r--r--docs/releases/1.9.txt4
-rw-r--r--docs/topics/auth/default.txt4
-rw-r--r--docs/topics/http/shortcuts.txt4
-rw-r--r--docs/topics/i18n/translation.txt2
-rw-r--r--docs/topics/signals.txt2
-rw-r--r--docs/topics/templates.txt2
-rw-r--r--tests/admin_inlines/tests.py2
-rw-r--r--tests/aggregation/tests.py4
-rw-r--r--tests/auth_tests/test_views.py4
-rw-r--r--tests/deprecation/tests.py2
-rw-r--r--tests/field_subclassing/fields.py6
-rw-r--r--tests/file_storage/tests.py4
-rw-r--r--tests/forms_tests/tests/test_fields.py6
-rw-r--r--tests/generic_views/test_edit.py10
-rw-r--r--tests/gis_tests/distapp/tests.py18
-rw-r--r--tests/gis_tests/geo3d/tests.py16
-rw-r--r--tests/gis_tests/geoapp/test_sitemaps.py4
-rw-r--r--tests/gis_tests/geoapp/tests.py10
-rw-r--r--tests/gis_tests/geogapp/tests.py6
-rw-r--r--tests/gis_tests/relatedapp/tests.py8
-rw-r--r--tests/i18n/urls.py6
-rw-r--r--tests/migrations/test_commands.py4
-rw-r--r--tests/model_meta/test_legacy.py16
-rw-r--r--tests/multiple_database/tests.py4
-rw-r--r--tests/resolve_url/tests.py4
-rwxr-xr-xtests/runtests.py14
-rw-r--r--tests/settings_tests/tests.py2
-rw-r--r--tests/shortcuts/tests.py16
-rw-r--r--tests/sitemaps_tests/test_http.py8
-rw-r--r--tests/sitemaps_tests/test_https.py6
-rw-r--r--tests/template_backends/test_django.py4
-rw-r--r--tests/template_tests/filter_tests/test_removetags.py6
-rw-r--r--tests/template_tests/filter_tests/test_unordered_list.py8
-rw-r--r--tests/template_tests/syntax_tests/test_cycle.py20
-rw-r--r--tests/template_tests/syntax_tests/test_firstof.py10
-rw-r--r--tests/template_tests/syntax_tests/test_for.py12
-rw-r--r--tests/template_tests/syntax_tests/test_if.py8
-rw-r--r--tests/template_tests/syntax_tests/test_ssi.py6
-rw-r--r--tests/template_tests/syntax_tests/test_url.py40
-rw-r--r--tests/template_tests/test_custom.py4
-rw-r--r--tests/template_tests/test_engine.py6
-rw-r--r--tests/template_tests/test_extends.py4
-rw-r--r--tests/template_tests/test_loaders.py14
-rw-r--r--tests/template_tests/test_response.py8
-rw-r--r--tests/test_client_regress/tests.py8
-rw-r--r--tests/test_runner/tests.py4
-rw-r--r--tests/urlpatterns_reverse/erroneous_urls.py6
-rw-r--r--tests/urlpatterns_reverse/included_namespace_urls.py6
-rw-r--r--tests/urlpatterns_reverse/tests.py20
-rw-r--r--tests/urlpatterns_reverse/urls.py6
-rw-r--r--tests/user_commands/tests.py4
-rw-r--r--tests/utils_tests/test_checksums.py4
-rw-r--r--tests/utils_tests/test_html.py6
-rw-r--r--tests/view_tests/tests/test_csrf.py2
124 files changed, 455 insertions, 448 deletions
diff --git a/django/conf/__init__.py b/django/conf/__init__.py
index 63d32be9c9..bbc0fb92cd 100644
--- a/django/conf/__init__.py
+++ b/django/conf/__init__.py
@@ -13,7 +13,7 @@ import warnings
from django.conf import global_settings
from django.core.exceptions import ImproperlyConfigured
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.functional import LazyObject, empty
ENVIRONMENT_VARIABLE = "DJANGO_SETTINGS_MODULE"
@@ -114,11 +114,11 @@ class Settings(BaseSettings):
if ('django.contrib.auth.middleware.AuthenticationMiddleware' in self.MIDDLEWARE_CLASSES and
'django.contrib.auth.middleware.SessionAuthenticationMiddleware' not in self.MIDDLEWARE_CLASSES):
warnings.warn(
- "Session verification will become mandatory in Django 2.0. "
+ "Session verification will become mandatory in Django 1.10. "
"Please add 'django.contrib.auth.middleware.SessionAuthenticationMiddleware' "
"to your MIDDLEWARE_CLASSES setting when you are ready to opt-in after "
"reading the upgrade considerations in the 1.8 release notes.",
- RemovedInDjango20Warning
+ RemovedInDjango110Warning
)
if hasattr(time, 'tzset') and self.TIME_ZONE:
diff --git a/django/conf/urls/__init__.py b/django/conf/urls/__init__.py
index 64bec13ec1..4a7fef9f78 100644
--- a/django/conf/urls/__init__.py
+++ b/django/conf/urls/__init__.py
@@ -5,8 +5,9 @@ from django.core.urlresolvers import (RegexURLPattern,
RegexURLResolver, LocaleRegexURLResolver)
from django.core.exceptions import ImproperlyConfigured
from django.utils import six
-from django.utils.deprecation import RemovedInDjango20Warning, RemovedInDjango21Warning
-
+from django.utils.deprecation import (
+ RemovedInDjango20Warning, RemovedInDjango110Warning,
+)
__all__ = ['handler400', 'handler403', 'handler404', 'handler500', 'include', 'patterns', 'url']
@@ -23,7 +24,7 @@ def include(arg, namespace=None, app_name=None):
warnings.warn(
'The app_name argument to django.conf.urls.include() is deprecated. '
'Set the app_name in the included URLconf instead.',
- RemovedInDjango21Warning, stacklevel=2
+ RemovedInDjango20Warning, stacklevel=2
)
if isinstance(arg, tuple):
@@ -39,7 +40,7 @@ def include(arg, namespace=None, app_name=None):
'Passing a 3-tuple to django.conf.urls.include() is deprecated. '
'Pass a 2-tuple containing the list of patterns and app_name, '
'and provide the namespace argument to include() instead.',
- RemovedInDjango21Warning, stacklevel=2
+ RemovedInDjango20Warning, stacklevel=2
)
urlconf_module, app_name, namespace = arg
else:
@@ -56,7 +57,7 @@ def include(arg, namespace=None, app_name=None):
'providing an app_name is deprecated. Set the app_name attribute '
'in the included module, or pass a 2-tuple containing the list of '
'patterns and app_name instead.',
- RemovedInDjango21Warning, stacklevel=2
+ RemovedInDjango20Warning, stacklevel=2
)
namespace = namespace or app_name
@@ -77,9 +78,9 @@ def include(arg, namespace=None, app_name=None):
def patterns(prefix, *args):
warnings.warn(
'django.conf.urls.patterns() is deprecated and will be removed in '
- 'Django 2.0. Update your urlpatterns to be a list of '
+ 'Django 1.10. Update your urlpatterns to be a list of '
'django.conf.urls.url() instances instead.',
- RemovedInDjango20Warning, stacklevel=2
+ RemovedInDjango110Warning, stacklevel=2
)
pattern_list = []
for t in args:
@@ -100,9 +101,9 @@ def url(regex, view, kwargs=None, name=None, prefix=''):
if isinstance(view, six.string_types):
warnings.warn(
'Support for string view arguments to url() is deprecated and '
- 'will be removed in Django 2.0 (got %s). Pass the callable '
+ 'will be removed in Django 1.10 (got %s). Pass the callable '
'instead.' % view,
- RemovedInDjango20Warning, stacklevel=2
+ RemovedInDjango110Warning, stacklevel=2
)
if not view:
raise ImproperlyConfigured('Empty URL pattern view name not permitted (for pattern %r)' % regex)
diff --git a/django/conf/urls/i18n.py b/django/conf/urls/i18n.py
index 9366a5f708..44e05b357d 100644
--- a/django/conf/urls/i18n.py
+++ b/django/conf/urls/i18n.py
@@ -4,7 +4,7 @@ from django.conf import settings
from django.conf.urls import patterns, url
from django.core.urlresolvers import LocaleRegexURLResolver
from django.utils import six
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.views.i18n import set_language
@@ -18,9 +18,9 @@ def i18n_patterns(prefix, *args):
warnings.warn(
"Calling i18n_patterns() with the `prefix` argument and with tuples "
"instead of django.conf.urls.url() instances is deprecated and "
- "will no longer work in Django 2.0. Use a list of "
+ "will no longer work in Django 1.10. Use a list of "
"django.conf.urls.url() instances instead.",
- RemovedInDjango20Warning, stacklevel=2
+ RemovedInDjango110Warning, stacklevel=2
)
pattern_list = patterns(prefix, *args)
else:
diff --git a/django/contrib/admin/helpers.py b/django/contrib/admin/helpers.py
index d713652ba4..c9121c7b36 100644
--- a/django/contrib/admin/helpers.py
+++ b/django/contrib/admin/helpers.py
@@ -14,7 +14,7 @@ from django.db.models.fields.related import ManyToManyRel
from django.forms.utils import flatatt
from django.template.defaultfilters import capfirst, linebreaksbr
from django.utils import six
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import force_text, smart_text
from django.utils.functional import cached_property
from django.utils.html import conditional_escape, format_html
@@ -285,9 +285,9 @@ class InlineAdminForm(AdminForm):
def original_content_type_id(self):
warnings.warn(
'InlineAdminForm.original_content_type_id is deprecated and will be '
- 'removed in Django 2.0. If you were using this attribute to construct '
+ 'removed in Django 1.10. If you were using this attribute to construct '
'the "view on site" URL, use the `absolute_url` attribute instead.',
- RemovedInDjango20Warning, stacklevel=2
+ RemovedInDjango110Warning, stacklevel=2
)
if self.original is not None:
# Since this module gets imported in the application's root package,
diff --git a/django/contrib/auth/tests/utils.py b/django/contrib/auth/tests/utils.py
index ba030d632c..035b3a5f42 100644
--- a/django/contrib/auth/tests/utils.py
+++ b/django/contrib/auth/tests/utils.py
@@ -2,7 +2,7 @@ import warnings
from unittest import skipIf
from django.conf import settings
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
def skipIfCustomUser(test_func):
@@ -11,6 +11,6 @@ def skipIfCustomUser(test_func):
"""
warnings.warn(
"django.contrib.auth.tests.utils.skipIfCustomUser is deprecated.",
- RemovedInDjango21Warning, stacklevel=2)
+ RemovedInDjango20Warning, stacklevel=2)
return skipIf(settings.AUTH_USER_MODEL != 'auth.User', 'Custom user model in use')(test_func)
diff --git a/django/contrib/auth/views.py b/django/contrib/auth/views.py
index 99363c392e..e57d151d55 100644
--- a/django/contrib/auth/views.py
+++ b/django/contrib/auth/views.py
@@ -16,7 +16,7 @@ from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, QueryDict
from django.shortcuts import resolve_url
from django.template.response import TemplateResponse
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import force_text
from django.utils.http import is_safe_url, urlsafe_base64_decode
from django.utils.six.moves.urllib.parse import urlparse, urlunparse
@@ -175,8 +175,8 @@ def password_reset(request, is_admin_site=False,
warnings.warn(
"The is_admin_site argument to "
"django.contrib.auth.views.password_reset() is deprecated "
- "and will be removed in Django 2.0.",
- RemovedInDjango20Warning, 3
+ "and will be removed in Django 1.10.",
+ RemovedInDjango110Warning, 3
)
opts = dict(opts, domain_override=request.get_host())
form.save(**opts)
diff --git a/django/contrib/contenttypes/models.py b/django/contrib/contenttypes/models.py
index 2aadf80027..27a5388a70 100644
--- a/django/contrib/contenttypes/models.py
+++ b/django/contrib/contenttypes/models.py
@@ -5,7 +5,7 @@ import warnings
from django.apps import apps
from django.db import models
from django.db.utils import IntegrityError, OperationalError, ProgrammingError
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import force_text, python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
@@ -41,7 +41,7 @@ class ContentTypeManager(models.Manager):
del kwargs['name']
warnings.warn(
"ContentType.name field doesn't exist any longer. Please remove it from your code.",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
return super(ContentTypeManager, self).create(**kwargs)
def get_for_model(self, model, for_concrete_model=True):
diff --git a/django/contrib/gis/db/models/manager.py b/django/contrib/gis/db/models/manager.py
index 91caaef171..00ce7a3c8f 100644
--- a/django/contrib/gis/db/models/manager.py
+++ b/django/contrib/gis/db/models/manager.py
@@ -2,7 +2,7 @@ import warnings
from django.contrib.gis.db.models.query import GeoQuerySet
from django.db.models.manager import Manager
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
class GeoManager(Manager.from_queryset(GeoQuerySet)):
@@ -17,6 +17,6 @@ class GeoManager(Manager.from_queryset(GeoQuerySet)):
warnings.warn(
"The GeoManager class is deprecated. Simply use a normal manager "
"once you have replaced all calls to GeoQuerySet methods by annotations.",
- RemovedInDjango21Warning, stacklevel=2
+ RemovedInDjango20Warning, stacklevel=2
)
super(GeoManager, self).__init__(*args, **kwargs)
diff --git a/django/contrib/gis/db/models/query.py b/django/contrib/gis/db/models/query.py
index 4fe9969b0d..66c45aa2be 100644
--- a/django/contrib/gis/db/models/query.py
+++ b/django/contrib/gis/db/models/query.py
@@ -16,7 +16,7 @@ from django.db.models.fields import Field
from django.db.models.query import QuerySet
from django.utils import six
from django.utils.deprecation import (
- RemovedInDjango20Warning, RemovedInDjango21Warning,
+ RemovedInDjango20Warning, RemovedInDjango110Warning,
)
@@ -71,7 +71,7 @@ class GeoQuerySet(QuerySet):
warnings.warn(
"The collect GeoQuerySet method is deprecated. Use the Collect() "
"aggregate in an aggregate() or annotate() method.",
- RemovedInDjango20Warning, stacklevel=2
+ RemovedInDjango110Warning, stacklevel=2
)
return self._spatial_aggregate(aggregates.Collect, **kwargs)
@@ -116,7 +116,7 @@ class GeoQuerySet(QuerySet):
warnings.warn(
"The extent GeoQuerySet method is deprecated. Use the Extent() "
"aggregate in an aggregate() or annotate() method.",
- RemovedInDjango20Warning, stacklevel=2
+ RemovedInDjango110Warning, stacklevel=2
)
return self._spatial_aggregate(aggregates.Extent, **kwargs)
@@ -129,7 +129,7 @@ class GeoQuerySet(QuerySet):
warnings.warn(
"The extent3d GeoQuerySet method is deprecated. Use the Extent3D() "
"aggregate in an aggregate() or annotate() method.",
- RemovedInDjango20Warning, stacklevel=2
+ RemovedInDjango110Warning, stacklevel=2
)
return self._spatial_aggregate(aggregates.Extent3D, **kwargs)
@@ -236,7 +236,7 @@ class GeoQuerySet(QuerySet):
warnings.warn(
"The make_line GeoQuerySet method is deprecated. Use the MakeLine() "
"aggregate in an aggregate() or annotate() method.",
- RemovedInDjango20Warning, stacklevel=2
+ RemovedInDjango110Warning, stacklevel=2
)
return self._spatial_aggregate(aggregates.MakeLine, geo_field_type=PointField, **kwargs)
@@ -424,7 +424,7 @@ class GeoQuerySet(QuerySet):
warnings.warn(
"The unionagg GeoQuerySet method is deprecated. Use the Union() "
"aggregate in an aggregate() or annotate() method.",
- RemovedInDjango20Warning, stacklevel=2
+ RemovedInDjango110Warning, stacklevel=2
)
return self._spatial_aggregate(aggregates.Union, **kwargs)
@@ -518,7 +518,7 @@ class GeoQuerySet(QuerySet):
warnings.warn(
"The %s GeoQuerySet method is deprecated. See GeoDjango Functions "
"documentation to find the expression-based replacement." % att,
- RemovedInDjango21Warning, stacklevel=2
+ RemovedInDjango20Warning, stacklevel=2
)
# Default settings.
settings.setdefault('desc', None)
diff --git a/django/contrib/gis/db/models/sql/aggregates.py b/django/contrib/gis/db/models/sql/aggregates.py
index b83bafda70..e3fb049cf5 100644
--- a/django/contrib/gis/db/models/sql/aggregates.py
+++ b/django/contrib/gis/db/models/sql/aggregates.py
@@ -7,4 +7,4 @@ __all__ = ['Collect', 'Extent', 'Extent3D', 'MakeLine', 'Union'] + aggregates.__
warnings.warn(
"django.contrib.gis.db.models.sql.aggregates is deprecated. Use "
"django.contrib.gis.db.models.aggregates instead.",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
diff --git a/django/contrib/webdesign/__init__.py b/django/contrib/webdesign/__init__.py
index 635ed88a67..eacf09612c 100644
--- a/django/contrib/webdesign/__init__.py
+++ b/django/contrib/webdesign/__init__.py
@@ -1,11 +1,11 @@
import warnings
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
default_app_config = 'django.contrib.webdesign.apps.WebDesignConfig'
warnings.warn(
- "django.contrib.webdesign will be removed in Django 2.0. The "
+ "django.contrib.webdesign will be removed in Django 1.10. The "
"{% lorem %} tag is now included in the built-in tags.",
- RemovedInDjango20Warning
+ RemovedInDjango110Warning
)
diff --git a/django/core/context_processors.py b/django/core/context_processors.py
index f2303bec59..f106439f12 100644
--- a/django/core/context_processors.py
+++ b/django/core/context_processors.py
@@ -1,9 +1,9 @@
import warnings
from django.template.context_processors import * # NOQA
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
warnings.warn(
"django.core.context_processors is deprecated in favor of "
"django.template.context_processors.",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
diff --git a/django/core/files/storage.py b/django/core/files/storage.py
index 554f05f2a9..39cf5d800b 100644
--- a/django/core/files/storage.py
+++ b/django/core/files/storage.py
@@ -10,7 +10,7 @@ from django.core.files.move import file_move_safe
from django.utils._os import abspathu, safe_join
from django.utils.crypto import get_random_string
from django.utils.deconstruct import deconstructible
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import filepath_to_uri, force_text
from django.utils.functional import LazyObject
from django.utils.inspect import func_supports_parameter
@@ -55,8 +55,8 @@ class Storage(object):
warnings.warn(
'Backwards compatibility for storage backends without '
'support for the `max_length` argument in '
- 'Storage.get_available_name() will be removed in Django 2.0.',
- RemovedInDjango20Warning, stacklevel=2
+ 'Storage.get_available_name() will be removed in Django 1.10.',
+ RemovedInDjango110Warning, stacklevel=2
)
name = self.get_available_name(name)
diff --git a/django/core/handlers/base.py b/django/core/handlers/base.py
index b232082fde..628f45df9e 100644
--- a/django/core/handlers/base.py
+++ b/django/core/handlers/base.py
@@ -14,7 +14,7 @@ from django.core.exceptions import (
from django.db import connections, transaction
from django.http.multipartparser import MultiPartParserError
from django.utils import six
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
from django.utils.encoding import force_text
from django.utils.module_loading import import_string
from django.views import debug
@@ -93,8 +93,8 @@ class BaseHandler(object):
except TypeError:
warnings.warn(
"Error handlers should accept an exception parameter. Update "
- "your code as this parameter will be required in Django 2.1",
- RemovedInDjango21Warning, stacklevel=2
+ "your code as this parameter will be required in Django 2.0",
+ RemovedInDjango20Warning, stacklevel=2
)
response = callback(request, **param_dict)
except:
diff --git a/django/core/management/base.py b/django/core/management/base.py
index 8a5d2083c1..7b31a69478 100644
--- a/django/core/management/base.py
+++ b/django/core/management/base.py
@@ -15,7 +15,7 @@ import django
from django.core import checks
from django.core.management.color import color_style, no_style
from django.db import connections
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import force_str
@@ -170,7 +170,7 @@ class BaseCommand(object):
``option_list``
This is the list of ``optparse`` options which will be fed
into the command's ``OptionParser`` for parsing arguments.
- Deprecated and will be removed in Django 2.0.
+ Deprecated and will be removed in Django 1.10.
``output_transaction``
A boolean indicating whether the command outputs SQL
@@ -263,7 +263,7 @@ class BaseCommand(object):
# Backwards compatibility: use deprecated optparse module
warnings.warn("OptionParser usage for Django management commands "
"is deprecated, use ArgumentParser instead",
- RemovedInDjango20Warning)
+ RemovedInDjango110Warning)
parser = OptionParser(prog=prog_name,
usage=self.usage(subcommand),
version=self.get_version())
@@ -578,9 +578,9 @@ class NoArgsCommand(BaseCommand):
def __init__(self):
warnings.warn(
- "NoArgsCommand class is deprecated and will be removed in Django 2.0. "
+ "NoArgsCommand class is deprecated and will be removed in Django 1.10. "
"Use BaseCommand instead, which takes no arguments by default.",
- RemovedInDjango20Warning
+ RemovedInDjango110Warning
)
super(NoArgsCommand, self).__init__()
diff --git a/django/core/management/commands/migrate.py b/django/core/management/commands/migrate.py
index 2217d2f277..fe26a0fbf6 100644
--- a/django/core/management/commands/migrate.py
+++ b/django/core/management/commands/migrate.py
@@ -17,7 +17,7 @@ from django.db.migrations.autodetector import MigrationAutodetector
from django.db.migrations.executor import MigrationExecutor
from django.db.migrations.loader import AmbiguityError
from django.db.migrations.state import ProjectState
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.module_loading import module_has_submodule
@@ -66,7 +66,7 @@ class Command(BaseCommand):
if options.get("list", False):
warnings.warn(
"The 'migrate --list' command is deprecated. Use 'showmigrations' instead.",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
self.stdout.ending = None # Remove when #21429 is fixed
return call_command(
'showmigrations',
diff --git a/django/core/urlresolvers.py b/django/core/urlresolvers.py
index fff758d92f..b7acab0606 100644
--- a/django/core/urlresolvers.py
+++ b/django/core/urlresolvers.py
@@ -18,7 +18,7 @@ from django.core.exceptions import ImproperlyConfigured, ViewDoesNotExist
from django.http import Http404
from django.utils import lru_cache, six
from django.utils.datastructures import MultiValueDict
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import force_str, force_text, iri_to_uri
from django.utils.functional import cached_property, lazy
from django.utils.http import RFC3986_SUBDELIMS, urlquote
@@ -459,7 +459,7 @@ class RegexURLResolver(LocaleRegexProvider):
if not callable(original_lookup) and callable(lookup_view):
warnings.warn(
'Reversing by dotted path is deprecated (%s).' % original_lookup,
- RemovedInDjango20Warning, stacklevel=3
+ RemovedInDjango110Warning, stacklevel=3
)
possibilities = self.reverse_dict.getlist(lookup_view)
diff --git a/django/db/backends/base/operations.py b/django/db/backends/base/operations.py
index 36feb83f49..f8cee9e755 100644
--- a/django/db/backends/base/operations.py
+++ b/django/db/backends/base/operations.py
@@ -8,7 +8,7 @@ from django.core.exceptions import ImproperlyConfigured
from django.db.backends import utils
from django.utils import six, timezone
from django.utils.dateparse import parse_duration
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
from django.utils.encoding import force_text
@@ -559,7 +559,7 @@ class BaseDatabaseOperations(object):
warnings.warn(
"check_aggregate_support has been deprecated. Use "
"check_expression_support instead.",
- RemovedInDjango21Warning, stacklevel=2)
+ RemovedInDjango20Warning, stacklevel=2)
return self.check_expression_support(aggregate_func)
def check_expression_support(self, expression):
diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py
index 4c993c05d7..03f3857664 100644
--- a/django/db/backends/mysql/base.py
+++ b/django/db/backends/mysql/base.py
@@ -16,7 +16,7 @@ from django.db import utils
from django.db.backends import utils as backend_utils
from django.db.backends.base.base import BaseDatabaseWrapper
from django.utils import six, timezone
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
from django.utils.encoding import force_str
from django.utils.functional import cached_property
from django.utils.safestring import SafeBytes, SafeText
@@ -54,13 +54,13 @@ IntegrityError = Database.IntegrityError
def adapt_datetime_warn_on_aware_datetime(value, conv):
- # Remove this function and rely on the default adapter in Django 2.1.
+ # Remove this function and rely on the default adapter in Django 2.0.
if settings.USE_TZ and timezone.is_aware(value):
warnings.warn(
"The MySQL database adapter received an aware datetime (%s), "
"probably from cursor.execute(). Update your code to pass a "
"naive datetime in the database connection's time zone (UTC by "
- "default).", RemovedInDjango21Warning)
+ "default).", RemovedInDjango20Warning)
# This doesn't account for the database connection's timezone,
# which isn't known. (That's why this adapter is deprecated.)
value = value.astimezone(timezone.utc).replace(tzinfo=None)
diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py
index f88527e349..ceec5d790a 100644
--- a/django/db/backends/oracle/base.py
+++ b/django/db/backends/oracle/base.py
@@ -17,7 +17,7 @@ from django.db import utils
from django.db.backends.base.base import BaseDatabaseWrapper
from django.db.backends.base.validation import BaseDatabaseValidation
from django.utils import six, timezone
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
from django.utils.duration import duration_string
from django.utils.encoding import force_bytes, force_text
from django.utils.functional import cached_property
@@ -342,7 +342,7 @@ class OracleParam(object):
"The Oracle database adapter received an aware datetime (%s), "
"probably from cursor.execute(). Update your code to pass a "
"naive datetime in the database connection's time zone (UTC by "
- "default).", RemovedInDjango21Warning)
+ "default).", RemovedInDjango20Warning)
param = param.astimezone(timezone.utc).replace(tzinfo=None)
param = Oracle_datetime.from_datetime(param)
diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py
index ce77103231..da9a21cbe9 100644
--- a/django/db/backends/sqlite3/base.py
+++ b/django/db/backends/sqlite3/base.py
@@ -20,7 +20,7 @@ from django.utils import six, timezone
from django.utils.dateparse import (
parse_date, parse_datetime, parse_duration, parse_time,
)
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
from django.utils.encoding import force_text
from django.utils.safestring import SafeBytes
@@ -51,13 +51,13 @@ IntegrityError = Database.IntegrityError
def adapt_datetime_warn_on_aware_datetime(value):
- # Remove this function and rely on the default adapter in Django 2.1.
+ # Remove this function and rely on the default adapter in Django 2.0.
if settings.USE_TZ and timezone.is_aware(value):
warnings.warn(
"The SQLite database adapter received an aware datetime (%s), "
"probably from cursor.execute(). Update your code to pass a "
"naive datetime in the database connection's time zone (UTC by "
- "default).", RemovedInDjango21Warning)
+ "default).", RemovedInDjango20Warning)
# This doesn't account for the database connection's timezone,
# which isn't known. (That's why this adapter is deprecated.)
value = value.astimezone(timezone.utc).replace(tzinfo=None)
diff --git a/django/db/models/aggregates.py b/django/db/models/aggregates.py
index 08c9169c6c..81e37e8dde 100644
--- a/django/db/models/aggregates.py
+++ b/django/db/models/aggregates.py
@@ -41,7 +41,7 @@ class Aggregate(Func):
def _patch_aggregate(self, query):
"""
Helper method for patching 3rd party aggregates that do not yet support
- the new way of subclassing. This method should be removed in 2.0
+ the new way of subclassing. This method will be removed in Django 1.10.
add_to_query(query, alias, col, source, is_summary) will be defined on
legacy aggregates which, in turn, instantiates the SQL implementation of
diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py
index de13b738d9..abea9258ad 100644
--- a/django/db/models/fields/__init__.py
+++ b/django/db/models/fields/__init__.py
@@ -24,7 +24,7 @@ from django.utils.duration import duration_string
from django.utils.functional import cached_property, curry, Promise
from django.utils.text import capfirst
from django.utils import timezone
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import (smart_text, force_text, force_bytes,
python_2_unicode_compatible)
@@ -246,7 +246,7 @@ class Field(RegisterLookupMixin):
def rel(self):
warnings.warn(
"Usage of field.rel has been deprecated. Use field.remote_field instead.",
- RemovedInDjango21Warning, 2)
+ RemovedInDjango20Warning, 2)
return self.remote_field
def _check_choices(self):
diff --git a/django/db/models/fields/files.py b/django/db/models/fields/files.py
index aaed449fc6..7468b05efc 100644
--- a/django/db/models/fields/files.py
+++ b/django/db/models/fields/files.py
@@ -10,7 +10,7 @@ from django.core.files.storage import default_storage
from django.db.models import signals
from django.db.models.fields import Field
from django.utils import six
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import force_str, force_text
from django.utils.inspect import func_supports_parameter
from django.utils.translation import ugettext_lazy as _
@@ -95,8 +95,8 @@ class FieldFile(File):
warnings.warn(
'Backwards compatibility for storage backends without '
'support for the `max_length` argument in '
- 'Storage.save() will be removed in Django 2.0.',
- RemovedInDjango20Warning, stacklevel=2
+ 'Storage.save() will be removed in Django 1.10.',
+ RemovedInDjango110Warning, stacklevel=2
)
self.name = self.storage.save(name, content)
diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py
index 59b8dc1329..0788db48f8 100644
--- a/django/db/models/fields/related.py
+++ b/django/db/models/fields/related.py
@@ -25,7 +25,7 @@ from django.db.models.query_utils import PathInfo
from django.db.models.utils import make_model_tuple
from django.utils import six
from django.utils.deprecation import (
- RemovedInDjango20Warning, RemovedInDjango21Warning,
+ RemovedInDjango20Warning, RemovedInDjango110Warning,
)
from django.utils.encoding import force_text, smart_text
from django.utils.functional import cached_property, curry
@@ -84,7 +84,7 @@ def add_lazy_relation(cls, field, relation, operation):
warnings.warn(
"add_lazy_relation() has been superseded by lazy_related_operation() "
"and related methods on the Apps class.",
- RemovedInDjango21Warning, stacklevel=2)
+ RemovedInDjango20Warning, stacklevel=2)
# Rearrange args for new Apps.lazy_model_operation
function = lambda local, related, field: operation(field, related, local)
lazy_related_operation(function, cls, relation, field=field)
@@ -328,7 +328,7 @@ class RelatedField(Field):
def related(self):
warnings.warn(
"Usage of field.related has been deprecated. Use field.remote_field instead.",
- RemovedInDjango20Warning, 2)
+ RemovedInDjango110Warning, 2)
return self.remote_field
def do_related_class(self, other, cls):
@@ -1306,7 +1306,7 @@ class ForeignObjectRel(object):
warnings.warn(
"Usage of ForeignObjectRel.to attribute has been deprecated. "
"Use the model attribute instead.",
- RemovedInDjango21Warning, 2)
+ RemovedInDjango20Warning, 2)
return self.model
@cached_property
diff --git a/django/db/models/fields/subclassing.py b/django/db/models/fields/subclassing.py
index 4233106429..84d13ce85c 100644
--- a/django/db/models/fields/subclassing.py
+++ b/django/db/models/fields/subclassing.py
@@ -9,7 +9,7 @@ seamlessly.
import warnings
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
class SubfieldBase(type):
@@ -19,7 +19,7 @@ class SubfieldBase(type):
"""
def __new__(cls, name, bases, attrs):
warnings.warn("SubfieldBase has been deprecated. Use Field.from_db_value instead.",
- RemovedInDjango20Warning)
+ RemovedInDjango110Warning)
new_class = super(SubfieldBase, cls).__new__(cls, name, bases, attrs)
new_class.contribute_to_class = make_contrib(
diff --git a/django/db/models/options.py b/django/db/models/options.py
index 6cfb73a51e..368ac621e1 100644
--- a/django/db/models/options.py
+++ b/django/db/models/options.py
@@ -14,7 +14,7 @@ from django.db.models.fields.proxy import OrderWrt
from django.db.models.fields.related import ManyToManyField
from django.utils import six
from django.utils.datastructures import ImmutableList, OrderedSet
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import (
force_text, python_2_unicode_compatible, smart_text,
)
@@ -53,7 +53,7 @@ class raise_deprecation(object):
fn.__name__,
self.suggested_alternative,
),
- RemovedInDjango20Warning, stacklevel=2
+ RemovedInDjango110Warning, stacklevel=2
)
return fn(*args, **kwargs)
return wrapper
@@ -537,7 +537,7 @@ class Options(object):
only forward fields will be returned.
The many_to_many argument exists for backwards compatibility reasons;
- it has been deprecated and will be removed in Django 2.0.
+ it has been deprecated and will be removed in Django 1.10.
"""
m2m_in_kwargs = many_to_many is not None
if m2m_in_kwargs:
@@ -546,7 +546,7 @@ class Options(object):
warnings.warn(
"The 'many_to_many' argument on get_field() is deprecated; "
"use a filter on field.many_to_many instead.",
- RemovedInDjango20Warning
+ RemovedInDjango110Warning
)
try:
diff --git a/django/db/models/sql/aggregates.py b/django/db/models/sql/aggregates.py
index 0ebe10e83f..5e73e4fc6a 100644
--- a/django/db/models/sql/aggregates.py
+++ b/django/db/models/sql/aggregates.py
@@ -6,7 +6,7 @@ import warnings
from django.db.models.fields import FloatField, IntegerField
from django.db.models.lookups import RegisterLookupMixin
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.functional import cached_property
__all__ = ['Aggregate', 'Avg', 'Count', 'Max', 'Min', 'StdDev', 'Sum', 'Variance']
@@ -15,7 +15,7 @@ __all__ = ['Aggregate', 'Avg', 'Count', 'Max', 'Min', 'StdDev', 'Sum', 'Variance
warnings.warn(
"django.db.models.sql.aggregates is deprecated. Use "
"django.db.models.aggregates instead.",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
class Aggregate(RegisterLookupMixin):
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py
index 291ce8298f..b31ab8d875 100644
--- a/django/db/models/sql/compiler.py
+++ b/django/db/models/sql/compiler.py
@@ -13,7 +13,7 @@ from django.db.models.sql.datastructures import EmptyResultSet
from django.db.models.sql.query import Query, get_order_dir
from django.db.transaction import TransactionManagementError
from django.db.utils import DatabaseError
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.six.moves import zip
@@ -338,7 +338,7 @@ class SQLCompiler(object):
warnings.warn(
"Calling a SQLCompiler directly is deprecated. "
"Call compiler.quote_name_unless_alias instead.",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
return self.quote_name_unless_alias(name)
def quote_name_unless_alias(self, name):
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index 55d083bdff..e88dad536d 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -29,7 +29,7 @@ from django.db.models.sql.where import (
AND, OR, ExtraWhere, NothingNode, WhereNode,
)
from django.utils import six
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import force_text
from django.utils.tree import Node
@@ -216,7 +216,7 @@ class Query(object):
def aggregates(self):
warnings.warn(
"The aggregates property is deprecated. Use annotations instead.",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
return self.annotations
def __str__(self):
@@ -973,7 +973,7 @@ class Query(object):
def add_aggregate(self, aggregate, model, alias, is_summary):
warnings.warn(
"add_aggregate() is deprecated. Use add_annotation() instead.",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
self.add_annotation(aggregate, alias, is_summary)
def add_annotation(self, annotation, alias, is_summary=False):
@@ -1806,7 +1806,7 @@ class Query(object):
def set_aggregate_mask(self, names):
warnings.warn(
"set_aggregate_mask() is deprecated. Use set_annotation_mask() instead.",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
self.set_annotation_mask(names)
def set_annotation_mask(self, names):
@@ -1820,7 +1820,7 @@ class Query(object):
def append_aggregate_mask(self, names):
warnings.warn(
"append_aggregate_mask() is deprecated. Use append_annotation_mask() instead.",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
self.append_annotation_mask(names)
def append_annotation_mask(self, names):
@@ -1863,7 +1863,7 @@ class Query(object):
def aggregate_select(self):
warnings.warn(
"aggregate_select() is deprecated. Use annotation_select() instead.",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
return self.annotation_select
@property
diff --git a/django/db/utils.py b/django/db/utils.py
index c6d32a7e9f..e5c4b8371b 100644
--- a/django/db/utils.py
+++ b/django/db/utils.py
@@ -9,7 +9,7 @@ from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils import six
from django.utils._os import upath
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.functional import cached_property
from django.utils.module_loading import import_string
@@ -304,8 +304,8 @@ class ConnectionRouter(object):
"The signature of allow_migrate has changed from "
"allow_migrate(self, db, model) to "
"allow_migrate(self, db, app_label, model_name=None, **hints). "
- "Support for the old signature will be removed in Django 2.0.",
- RemovedInDjango20Warning)
+ "Support for the old signature will be removed in Django 1.10.",
+ RemovedInDjango110Warning)
model = hints.get('model')
allow = None if model is None else method(db, model)
else:
diff --git a/django/dispatch/dispatcher.py b/django/dispatch/dispatcher.py
index 73213afe94..4983f8f427 100644
--- a/django/dispatch/dispatcher.py
+++ b/django/dispatch/dispatcher.py
@@ -4,7 +4,7 @@ import warnings
import weakref
from django.utils import six
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
from django.utils.inspect import func_accepts_kwargs
from django.utils.six.moves import range
@@ -145,7 +145,7 @@ class Signal(object):
"""
if weak is not None:
warnings.warn("Passing `weak` to disconnect has no effect.",
- RemovedInDjango21Warning, stacklevel=2)
+ RemovedInDjango20Warning, stacklevel=2)
if dispatch_uid:
lookup_key = (dispatch_uid, _make_id(sender))
else:
diff --git a/django/forms/extras/__init__.py b/django/forms/extras/__init__.py
index 1f411a5068..e1c8455f20 100644
--- a/django/forms/extras/__init__.py
+++ b/django/forms/extras/__init__.py
@@ -1,7 +1,7 @@
import warnings
from django.forms.widgets import SelectDateWidget
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
__all__ = ['SelectDateWidget']
@@ -9,4 +9,4 @@ __all__ = ['SelectDateWidget']
warnings.warn(
"django.forms.extras is deprecated. You can find "
"SelectDateWidget in django.forms.widgets instead.",
- RemovedInDjango21Warning, stacklevel=2)
+ RemovedInDjango20Warning, stacklevel=2)
diff --git a/django/forms/fields.py b/django/forms/fields.py
index e2d573a56f..1d609d2455 100644
--- a/django/forms/fields.py
+++ b/django/forms/fields.py
@@ -29,7 +29,7 @@ from django.forms.widgets import (
from django.utils import formats, six
from django.utils.dateparse import parse_duration
from django.utils.deprecation import (
- RemovedInDjango20Warning, RenameMethodsBase,
+ RemovedInDjango110Warning, RenameMethodsBase,
)
from django.utils.duration import duration_string
from django.utils.encoding import force_str, force_text, smart_text
@@ -50,7 +50,7 @@ __all__ = (
class RenameFieldMethods(RenameMethodsBase):
renamed_methods = (
- ('_has_changed', 'has_changed', RemovedInDjango20Warning),
+ ('_has_changed', 'has_changed', RemovedInDjango110Warning),
)
@@ -544,7 +544,7 @@ class RegexField(CharField):
warnings.warn(
"The 'error_message' argument is deprecated. Use "
"Field.error_messages['invalid'] instead.",
- RemovedInDjango20Warning, stacklevel=2
+ RemovedInDjango110Warning, stacklevel=2
)
error_messages = kwargs.get('error_messages') or {}
error_messages['invalid'] = error_message
diff --git a/django/shortcuts.py b/django/shortcuts.py
index 5b1ec7d4ab..1102aaa3dc 100644
--- a/django/shortcuts.py
+++ b/django/shortcuts.py
@@ -19,7 +19,7 @@ from django.template.engine import (
_context_instance_undefined, _dictionary_undefined, _dirs_undefined,
)
from django.utils import six
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import force_text
from django.utils.functional import Promise
@@ -62,7 +62,7 @@ def render(request, template_name, context=None,
and dirs is _dirs_undefined
and dictionary is _dictionary_undefined):
# No deprecated arguments were passed - use the new code path
- # In Django 2.0, request should become a positional argument.
+ # In Django 1.10, request should become a positional argument.
content = loader.render_to_string(
template_name, context, request=request, using=using)
@@ -78,7 +78,7 @@ def render(request, template_name, context=None,
warnings.warn(
"The current_app argument of render is deprecated. "
"Set the current_app attribute of request instead.",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
request.current_app = current_app
# Directly set the private attribute to avoid triggering the
# warning in RequestContext.__init__.
diff --git a/django/template/__init__.py b/django/template/__init__.py
index 20f4986837..7ca21a188f 100644
--- a/django/template/__init__.py
+++ b/django/template/__init__.py
@@ -62,7 +62,7 @@ from .exceptions import TemplateDoesNotExist, TemplateSyntaxError # NOQA
from .base import (Context, Node, NodeList, Origin, RequestContext, # NOQA
Template, Variable)
-# Deprecated in Django 1.8, will be removed in Django 2.0.
+# Deprecated in Django 1.8, will be removed in Django 1.10.
from .base import resolve_variable # NOQA
# Library management
diff --git a/django/template/backends/django.py b/django/template/backends/django.py
index 0f5481d941..deca90c28e 100644
--- a/django/template/backends/django.py
+++ b/django/template/backends/django.py
@@ -13,7 +13,7 @@ from django.template.context import Context, RequestContext, make_context
from django.template.engine import Engine, _dirs_undefined
from django.template.library import InvalidTemplateLibrary
from django.utils import six
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from .base import BaseEngine
@@ -69,7 +69,7 @@ class Template(object):
# >>> template.render(Context({'name': 'world'}))
# In Django 1.7 get_template() returned a django.template.Template.
# In Django 1.8 it returns a django.template.backends.django.Template.
- # In Django 2.0 the isinstance checks should be removed. If passing a
+ # In Django 1.10 the isinstance checks should be removed. If passing a
# Context or a RequestContext works by accident, it won't be an issue
# per se, but it won't be officially supported either.
if isinstance(context, RequestContext):
@@ -81,12 +81,12 @@ class Template(object):
"the two arguments refer to the same request.")
warnings.warn(
"render() must be called with a dict, not a RequestContext.",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
elif isinstance(context, Context):
warnings.warn(
"render() must be called with a dict, not a Context.",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
else:
context = make_context(context, request)
diff --git a/django/template/base.py b/django/template/base.py
index 7f33d79dc7..6579a41279 100644
--- a/django/template/base.py
+++ b/django/template/base.py
@@ -60,7 +60,7 @@ from django.template.context import ( # NOQA: imported for backwards compatibil
BaseContext, Context, ContextPopException, RequestContext,
)
from django.utils import six
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import (
force_str, force_text, python_2_unicode_compatible,
)
@@ -749,7 +749,7 @@ def resolve_variable(path, context):
"""
warnings.warn("resolve_variable() is deprecated. Use django.template."
"Variable(path).resolve(context) instead",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
return Variable(path).resolve(context)
diff --git a/django/template/context.py b/django/template/context.py
index 2926cec30a..f14c2ff7e9 100644
--- a/django/template/context.py
+++ b/django/template/context.py
@@ -2,7 +2,7 @@ import warnings
from contextlib import contextmanager
from copy import copy
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
# Hard-coded processor for easier use of CSRF protection.
_builtin_context_processors = ('django.template.context_processors.csrf',)
@@ -136,7 +136,7 @@ class Context(BaseContext):
warnings.warn(
"The current_app argument of Context is deprecated. Use "
"RequestContext and set the current_app attribute of its "
- "request instead.", RemovedInDjango20Warning, stacklevel=2)
+ "request instead.", RemovedInDjango110Warning, stacklevel=2)
self.autoescape = autoescape
self._current_app = current_app
self.use_l10n = use_l10n
@@ -221,7 +221,7 @@ class RequestContext(Context):
warnings.warn(
"The current_app argument of RequestContext is deprecated. "
"Set the current_app attribute of its request instead.",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
self._current_app = current_app
self.request = request
self._processors = () if processors is None else tuple(processors)
diff --git a/django/template/defaultfilters.py b/django/template/defaultfilters.py
index 0ab957f056..92e1a6ab78 100644
--- a/django/template/defaultfilters.py
+++ b/django/template/defaultfilters.py
@@ -11,7 +11,7 @@ from pprint import pformat
from django.conf import settings
from django.utils import formats, six
from django.utils.dateformat import format, time_format
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import force_text, iri_to_uri
from django.utils.html import (
avoid_wrapping, conditional_escape, escape, escapejs, linebreaks,
@@ -716,8 +716,8 @@ def unordered_list(value, autoescape=True):
if converted:
warnings.warn(
"The old style syntax in `unordered_list` is deprecated and will "
- "be removed in Django 2.0. Use the the new format instead.",
- RemovedInDjango20Warning)
+ "be removed in Django 1.10. Use the the new format instead.",
+ RemovedInDjango110Warning)
return mark_safe(list_formatter(value))
diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py
index fd64b49d13..b0501505b5 100644
--- a/django/template/defaulttags.py
+++ b/django/template/defaulttags.py
@@ -10,7 +10,7 @@ from itertools import cycle as itertools_cycle, groupby
from django.conf import settings
from django.utils import six, timezone
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import force_text, smart_text
from django.utils.html import format_html
from django.utils.lorem_ipsum import paragraphs, words
@@ -203,9 +203,9 @@ class ForNode(Node):
if num_loopvars != len_item:
warnings.warn(
"Need {} values to unpack in for loop; got {}. "
- "This will raise an exception in Django 2.0."
+ "This will raise an exception in Django 1.10."
.format(num_loopvars, len_item),
- RemovedInDjango20Warning)
+ RemovedInDjango110Warning)
try:
unpacked_vars = dict(zip(self.loopvars, item))
except TypeError:
@@ -480,7 +480,7 @@ class URLNode(Node):
current_app = context.request.current_app
except AttributeError:
# Change the fallback value to None when the deprecation path for
- # Context.current_app completes in Django 2.0.
+ # Context.current_app completes in Django 1.10.
current_app = context.current_app
# Try to look up the URL twice: once given the view name, and again
@@ -653,7 +653,7 @@ def cycle(parser, token):
if ',' in args[1]:
warnings.warn(
"The old {% cycle %} syntax with comma-separated arguments is deprecated.",
- RemovedInDjango20Warning,
+ RemovedInDjango110Warning,
)
# Backwards compatibility: {% cycle a,b %} or {% cycle a,b as foo %}
# case.
@@ -1103,7 +1103,7 @@ def ssi(parser, token):
"""
warnings.warn(
"The {% ssi %} tag is deprecated. Use the {% include %} tag instead.",
- RemovedInDjango20Warning,
+ RemovedInDjango110Warning,
)
bits = token.split_contents()
diff --git a/django/template/engine.py b/django/template/engine.py
index e7cd522527..2c9e2c2892 100644
--- a/django/template/engine.py
+++ b/django/template/engine.py
@@ -2,7 +2,7 @@ import warnings
from django.core.exceptions import ImproperlyConfigured
from django.utils import lru_cache, six
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.functional import cached_property
from django.utils.module_loading import import_string
@@ -141,7 +141,7 @@ class Engine(object):
warnings.warn(
"%s inherits from django.template.loader.BaseLoader "
"instead of django.template.loaders.base.Loader. " %
- loader, RemovedInDjango20Warning, stacklevel=2)
+ loader, RemovedInDjango110Warning, stacklevel=2)
return loader_class(*args)
else:
@@ -160,7 +160,7 @@ class Engine(object):
except TemplateDoesNotExist as e:
tried.extend(e.tried)
else:
- # RemovedInDjango21Warning: Use old api for non-recursive
+ # RemovedInDjango20Warning: Use old api for non-recursive
# loaders.
try:
return loader(name, dirs)
@@ -185,7 +185,7 @@ class Engine(object):
else:
warnings.warn(
"The dirs argument of get_template is deprecated.",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
template, origin = self.find_template(template_name, dirs)
if not hasattr(template, 'render'):
@@ -196,7 +196,7 @@ class Engine(object):
# This method was originally a function defined in django.template.loader.
# It was moved here in Django 1.8 when encapsulating the Django template
# engine in this Engine class. It's still called by deprecated code but it
- # will be removed in Django 2.0. It's superseded by a new render_to_string
+ # will be removed in Django 1.10. It's superseded by a new render_to_string
# function in django.template.loader.
def render_to_string(self, template_name, context=None,
@@ -208,7 +208,7 @@ class Engine(object):
else:
warnings.warn(
"The context_instance argument of render_to_string is "
- "deprecated.", RemovedInDjango20Warning, stacklevel=2)
+ "deprecated.", RemovedInDjango110Warning, stacklevel=2)
if dirs is _dirs_undefined:
# Do not set dirs to None here to avoid triggering the deprecation
# warning in select_template or get_template.
@@ -216,13 +216,13 @@ class Engine(object):
else:
warnings.warn(
"The dirs argument of render_to_string is deprecated.",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
if dictionary is _dictionary_undefined:
dictionary = None
else:
warnings.warn(
"The dictionary argument of render_to_string was renamed to "
- "context.", RemovedInDjango20Warning, stacklevel=2)
+ "context.", RemovedInDjango110Warning, stacklevel=2)
context = dictionary
if isinstance(template_name, (list, tuple)):
@@ -254,7 +254,7 @@ class Engine(object):
else:
warnings.warn(
"The dirs argument of select_template is deprecated.",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
if not template_name_list:
raise TemplateDoesNotExist("No template names provided")
diff --git a/django/template/library.py b/django/template/library.py
index 6d8a2fb675..1eaaf4c0be 100644
--- a/django/template/library.py
+++ b/django/template/library.py
@@ -3,7 +3,7 @@ import warnings
from importlib import import_module
from django.utils import six
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
from django.utils.inspect import getargspec
from django.utils.itercompat import is_iterable
@@ -136,7 +136,7 @@ class Library(object):
def assignment_tag(self, func=None, takes_context=None, name=None):
warnings.warn(
"assignment_tag() is deprecated. Use simple_tag() instead",
- RemovedInDjango21Warning,
+ RemovedInDjango20Warning,
stacklevel=2,
)
return self.simple_tag(func, takes_context, name)
diff --git a/django/template/loader.py b/django/template/loader.py
index 123eb7167f..ccc13f96c1 100644
--- a/django/template/loader.py
+++ b/django/template/loader.py
@@ -1,6 +1,6 @@
import warnings
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from . import engines
from .backends.django import DjangoTemplates
@@ -22,7 +22,7 @@ def get_template(template_name, dirs=_dirs_undefined, using=None):
for engine in engines:
try:
# This is required for deprecating the dirs argument. Simply
- # return engine.get_template(template_name) in Django 2.0.
+ # return engine.get_template(template_name) in Django 1.10.
if isinstance(engine, DjangoTemplates):
return engine.get_template(template_name, dirs)
elif dirs is not _dirs_undefined:
@@ -52,7 +52,7 @@ def select_template(template_name_list, dirs=_dirs_undefined, using=None):
for engine in engines:
try:
# This is required for deprecating the dirs argument. Simply
- # use engine.get_template(template_name) in Django 2.0.
+ # use engine.get_template(template_name) in Django 1.10.
if isinstance(engine, DjangoTemplates):
return engine.get_template(template_name, dirs)
elif dirs is not _dirs_undefined:
@@ -98,7 +98,7 @@ def render_to_string(template_name, context=None,
try:
# This is required for deprecating properly arguments specific
# to Django templates. Remove Engine.render_to_string() at the
- # same time as this code path in Django 2.0.
+ # same time as this code path in Django 1.10.
if isinstance(engine, DjangoTemplates):
if request is not None:
raise ValueError(
@@ -146,5 +146,5 @@ class BaseLoader(base.Loader):
warnings.warn(
"django.template.loader.BaseLoader was superseded by "
"django.template.loaders.base.Loader.",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
super(BaseLoader, self).__init__(*args, **kwargs)
diff --git a/django/template/loader_tags.py b/django/template/loader_tags.py
index 8d8afde5d9..1d6d922ede 100644
--- a/django/template/loader_tags.py
+++ b/django/template/loader_tags.py
@@ -101,7 +101,7 @@ class ExtendsNode(Node):
passed as the skip argument. This enables extends to work recursively
without extending the same template twice.
"""
- # RemovedInDjango21Warning: If any non-recursive loaders are installed
+ # RemovedInDjango20Warning: If any non-recursive loaders are installed
# do a direct template lookup. If the same template name appears twice,
# raise an exception to avoid system recursion.
for loader in context.template.engine.template_loaders:
diff --git a/django/template/loaders/base.py b/django/template/loaders/base.py
index dd6b52e2bb..46371bc0d4 100644
--- a/django/template/loaders/base.py
+++ b/django/template/loaders/base.py
@@ -1,19 +1,20 @@
import warnings
from django.template import Origin, Template, TemplateDoesNotExist
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
from django.utils.inspect import func_supports_parameter
class Loader(object):
- # Only used to raise a deprecation warning. Remove in Django 2.0.
+ # Only used to raise a deprecation warning. Remove in Django 1.10.
+ is_usable = False
_accepts_engine_in_init = True
def __init__(self, engine):
self.engine = engine
def __call__(self, template_name, template_dirs=None):
- # RemovedInDjango21Warning: Allow loaders to be called like functions.
+ # RemovedInDjango20Warning: Allow loaders to be called like functions.
return self.load_template(template_name, template_dirs)
def get_template(self, template_name, template_dirs=None, skip=None):
@@ -26,7 +27,7 @@ class Loader(object):
tried = []
args = [template_name]
- # RemovedInDjango21Warning: Add template_dirs for compatibility with
+ # RemovedInDjango20Warning: Add template_dirs for compatibility with
# old loaders
if func_supports_parameter(self.get_template_sources, 'template_dirs'):
args.append(template_dirs)
@@ -51,7 +52,7 @@ class Loader(object):
def load_template(self, template_name, template_dirs=None):
warnings.warn(
'The load_template() method is deprecated. Use get_template() '
- 'instead.', RemovedInDjango21Warning,
+ 'instead.', RemovedInDjango20Warning,
)
source, display_name = self.load_template_source(
template_name, template_dirs,
@@ -83,7 +84,7 @@ class Loader(object):
def load_template_source(self, template_name, template_dirs=None):
"""
- RemovedInDjango21Warning: Returns a tuple containing the source and
+ RemovedInDjango20Warning: Returns a tuple containing the source and
origin for the given template name.
"""
raise NotImplementedError(
@@ -100,7 +101,7 @@ class Loader(object):
@property
def supports_recursion(self):
"""
- RemovedInDjango21Warning: This is an internal property used by the
+ RemovedInDjango20Warning: This is an internal property used by the
ExtendsNode during the deprecation of non-recursive loaders.
"""
return hasattr(self, 'get_contents')
diff --git a/django/template/loaders/cached.py b/django/template/loaders/cached.py
index 54146fbfbb..c13346b961 100644
--- a/django/template/loaders/cached.py
+++ b/django/template/loaders/cached.py
@@ -7,7 +7,7 @@ import hashlib
import warnings
from django.template import Origin, Template, TemplateDoesNotExist
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
from django.utils.encoding import force_bytes
from django.utils.inspect import func_supports_parameter
@@ -18,7 +18,7 @@ class Loader(BaseLoader):
def __init__(self, engine, loaders):
self.template_cache = {}
- self.find_template_cache = {} # RemovedInDjango21Warning
+ self.find_template_cache = {} # RemovedInDjango20Warning
self.get_template_cache = {}
self.loaders = engine.get_template_loaders(loaders)
super(Loader, self).__init__(engine)
@@ -49,7 +49,7 @@ class Loader(BaseLoader):
def get_template_sources(self, template_name, template_dirs=None):
for loader in self.loaders:
args = [template_name]
- # RemovedInDjango21Warning: Add template_dirs for compatibility
+ # RemovedInDjango20Warning: Add template_dirs for compatibility
# with old loaders
if func_supports_parameter(loader.get_template_sources, 'template_dirs'):
args.append(template_dirs)
@@ -87,14 +87,14 @@ class Loader(BaseLoader):
@property
def supports_recursion(self):
"""
- RemovedInDjango21Warning: This is an internal property used by the
+ RemovedInDjango20Warning: This is an internal property used by the
ExtendsNode during the deprecation of non-recursive loaders.
"""
return all(hasattr(loader, 'get_contents') for loader in self.loaders)
def find_template(self, name, dirs=None):
"""
- RemovedInDjango21Warning: An internal method to lookup the template
+ RemovedInDjango20Warning: An internal method to lookup the template
name in all the configured loaders.
"""
key = self.cache_key(name, dirs)
@@ -125,7 +125,7 @@ class Loader(BaseLoader):
def load_template(self, template_name, template_dirs=None):
warnings.warn(
'The load_template() method is deprecated. Use get_template() '
- 'instead.', RemovedInDjango21Warning,
+ 'instead.', RemovedInDjango20Warning,
)
key = self.cache_key(template_name, template_dirs)
template_tuple = self.template_cache.get(key)
@@ -149,5 +149,5 @@ class Loader(BaseLoader):
def reset(self):
"Empty the template cache."
self.template_cache.clear()
- self.find_template_cache.clear() # RemovedInDjango21Warning
+ self.find_template_cache.clear() # RemovedInDjango20Warning
self.get_template_cache.clear()
diff --git a/django/template/loaders/eggs.py b/django/template/loaders/eggs.py
index 44caee45cd..e280a5ad56 100644
--- a/django/template/loaders/eggs.py
+++ b/django/template/loaders/eggs.py
@@ -6,7 +6,7 @@ import warnings
from django.apps import apps
from django.template import Origin, TemplateDoesNotExist
from django.utils import six
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
from .base import Loader as BaseLoader
@@ -62,7 +62,7 @@ class Loader(BaseLoader):
warnings.warn(
'The load_template_sources() method is deprecated. Use '
'get_template() or get_contents() instead.',
- RemovedInDjango21Warning,
+ RemovedInDjango20Warning,
)
for origin in self.get_template_sources(template_name):
try:
diff --git a/django/template/loaders/filesystem.py b/django/template/loaders/filesystem.py
index e21b85ef10..dd479e806b 100644
--- a/django/template/loaders/filesystem.py
+++ b/django/template/loaders/filesystem.py
@@ -9,7 +9,7 @@ import warnings
from django.core.exceptions import SuspiciousFileOperation
from django.template import Origin, TemplateDoesNotExist
from django.utils._os import safe_join
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
from .base import Loader as BaseLoader
@@ -54,7 +54,7 @@ class Loader(BaseLoader):
warnings.warn(
'The load_template_sources() method is deprecated. Use '
'get_template() or get_contents() instead.',
- RemovedInDjango21Warning,
+ RemovedInDjango20Warning,
)
for origin in self.get_template_sources(template_name, template_dirs):
try:
diff --git a/django/template/loaders/locmem.py b/django/template/loaders/locmem.py
index afb716db4b..a27dcd845b 100644
--- a/django/template/loaders/locmem.py
+++ b/django/template/loaders/locmem.py
@@ -5,7 +5,7 @@ Wrapper for loading templates from a plain Python dict.
import warnings
from django.template import Origin, TemplateDoesNotExist
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
from .base import Loader as BaseLoader
@@ -33,7 +33,7 @@ class Loader(BaseLoader):
warnings.warn(
'The load_template_sources() method is deprecated. Use '
'get_template() or get_contents() instead.',
- RemovedInDjango21Warning,
+ RemovedInDjango20Warning,
)
try:
return self.templates_dict[template_name], template_name
diff --git a/django/template/response.py b/django/template/response.py
index 1346303701..17b6066a81 100644
--- a/django/template/response.py
+++ b/django/template/response.py
@@ -2,7 +2,7 @@ import warnings
from django.http import HttpResponse
from django.utils import six
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from .backends.django import Template as BackendTemplate
from .base import Template
@@ -24,7 +24,7 @@ class SimpleTemplateResponse(HttpResponse):
"{}'s template argument cannot be a django.template.Template "
"anymore. It may be a backend-specific template like those "
"created by get_template().".format(self.__class__.__name__),
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
template = BackendTemplate(template)
# It would seem obvious to call these next two members 'template' and
@@ -86,7 +86,7 @@ class SimpleTemplateResponse(HttpResponse):
def _resolve_template(self, template):
# This wrapper deprecates returning a django.template.Template in
# subclasses that override resolve_template. It can be removed in
- # Django 2.0.
+ # Django 1.10.
new_template = self.resolve_template(template)
if isinstance(new_template, Template):
warnings.warn(
@@ -94,7 +94,7 @@ class SimpleTemplateResponse(HttpResponse):
"template like those created by get_template(), not a "
"{}.".format(
self.__class__.__name__, new_template.__class__.__name__),
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
new_template = BackendTemplate(new_template)
return new_template
@@ -104,7 +104,7 @@ class SimpleTemplateResponse(HttpResponse):
def _resolve_context(self, context):
# This wrapper deprecates returning a Context or a RequestContext in
# subclasses that override resolve_context. It can be removed in
- # Django 2.0. If returning a Context or a RequestContext works by
+ # Django 1.10. If returning a Context or a RequestContext works by
# accident, it won't be an issue per se, but it won't be officially
# supported either.
new_context = self.resolve_context(context)
@@ -114,7 +114,7 @@ class SimpleTemplateResponse(HttpResponse):
warnings.warn(
"{}.resolve_context() must return a dict, not a {}.".format(
self.__class__.__name__, new_context.__class__.__name__),
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
# It would be tempting to do new_context = new_context.flatten()
# here but that would cause template context processors to run for
# TemplateResponse(request, template, Context({})), which would be
@@ -201,7 +201,7 @@ class TemplateResponse(SimpleTemplateResponse):
warnings.warn(
"The current_app argument of TemplateResponse is deprecated. "
"Set the current_app attribute of its request instead.",
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
request.current_app = current_app
super(TemplateResponse, self).__init__(
template, context, content_type, status, charset, using)
diff --git a/django/template/smartif.py b/django/template/smartif.py
index 7b5a0083da..36c76cb5e6 100644
--- a/django/template/smartif.py
+++ b/django/template/smartif.py
@@ -3,7 +3,7 @@ Parser and utilities for the smart 'if' tag
"""
import warnings
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
# Using a simple top down parser, as described here:
@@ -102,7 +102,7 @@ OPERATORS = {
'not': prefix(8, lambda context, x: not x.eval(context)),
'in': infix(9, lambda context, x, y: x.eval(context) in y.eval(context)),
'not in': infix(9, lambda context, x, y: x.eval(context) not in y.eval(context)),
- # This should be removed in Django 2.0:
+ # This should be removed in Django 1.10:
'=': infix(10, lambda context, x, y: x.eval(context) == y.eval(context)),
'==': infix(10, lambda context, x, y: x.eval(context) == y.eval(context)),
'!=': infix(10, lambda context, x, y: x.eval(context) != y.eval(context)),
@@ -180,8 +180,8 @@ class IfParser(object):
else:
if token == '=':
warnings.warn(
- "Operator '=' is deprecated and will be removed in Django 2.0. Use '==' instead.",
- RemovedInDjango20Warning, stacklevel=2
+ "Operator '=' is deprecated and will be removed in Django 1.10. Use '==' instead.",
+ RemovedInDjango110Warning, stacklevel=2
)
return op()
diff --git a/django/template/utils.py b/django/template/utils.py
index ea72a8c5b1..cbf0de148d 100644
--- a/django/template/utils.py
+++ b/django/template/utils.py
@@ -7,7 +7,7 @@ from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils import lru_cache
from django.utils._os import upath
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.functional import cached_property
from django.utils.module_loading import import_string
@@ -33,8 +33,8 @@ class EngineHandler(object):
if not self._templates:
warnings.warn(
"You haven't defined a TEMPLATES setting. You must do so "
- "before upgrading to Django 2.0. Otherwise Django will be "
- "unable to load templates.", RemovedInDjango20Warning)
+ "before upgrading to Django 1.10. Otherwise Django will be "
+ "unable to load templates.", RemovedInDjango110Warning)
self._templates = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
diff --git a/django/templatetags/future.py b/django/templatetags/future.py
index 257bd9ac6c..5af0dcef72 100644
--- a/django/templatetags/future.py
+++ b/django/templatetags/future.py
@@ -1,7 +1,7 @@
import warnings
from django.template import Library, defaulttags
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
register = Library()
@@ -27,8 +27,8 @@ def cycle(parser, token):
"""
warnings.warn(
"Loading the `cycle` tag from the `future` library is deprecated and "
- "will be removed in Django 2.0. Use the default `cycle` tag instead.",
- RemovedInDjango20Warning)
+ "will be removed in Django 1.10. Use the default `cycle` tag instead.",
+ RemovedInDjango110Warning)
return defaulttags.cycle(parser, token)
@@ -62,6 +62,6 @@ def firstof(parser, token):
"""
warnings.warn(
"Loading the `firstof` tag from the `future` library is deprecated and "
- "will be removed in Django 2.0. Use the default `firstof` tag instead.",
- RemovedInDjango20Warning)
+ "will be removed in Django 1.10. Use the default `firstof` tag instead.",
+ RemovedInDjango110Warning)
return defaulttags.firstof(parser, token)
diff --git a/django/test/testcases.py b/django/test/testcases.py
index 60bda8c623..de0517f375 100644
--- a/django/test/testcases.py
+++ b/django/test/testcases.py
@@ -39,7 +39,7 @@ from django.test.utils import (
from django.utils import six
from django.utils.decorators import classproperty
from django.utils.deprecation import (
- RemovedInDjango20Warning, RemovedInDjango21Warning,
+ RemovedInDjango20Warning, RemovedInDjango110Warning,
)
from django.utils.encoding import force_text
from django.utils.six.moves.urllib.parse import (
@@ -233,9 +233,9 @@ class SimpleTestCase(unittest.TestCase):
if hasattr(self, 'urls'):
warnings.warn(
"SimpleTestCase.urls is deprecated and will be removed in "
- "Django 2.0. Use @override_settings(ROOT_URLCONF=...) "
+ "Django 1.10. Use @override_settings(ROOT_URLCONF=...) "
"in %s instead." % self.__class__.__name__,
- RemovedInDjango20Warning, stacklevel=2)
+ RemovedInDjango110Warning, stacklevel=2)
set_urlconf(None)
self._old_root_urlconf = settings.ROOT_URLCONF
settings.ROOT_URLCONF = self.urls
@@ -280,7 +280,7 @@ class SimpleTestCase(unittest.TestCase):
if host is not None:
warnings.warn(
"The host argument is deprecated and no longer used by assertRedirects",
- RemovedInDjango21Warning, stacklevel=2
+ RemovedInDjango20Warning, stacklevel=2
)
if msg_prefix:
@@ -337,7 +337,7 @@ class SimpleTestCase(unittest.TestCase):
"expected URL, as it was always added automatically to URLs "
"before Django 1.9. Please update your expected URLs by "
"removing the scheme and domain.",
- RemovedInDjango21Warning, stacklevel=2)
+ RemovedInDjango20Warning, stacklevel=2)
expected_url = relative_url
self.assertEqual(url, expected_url,
diff --git a/django/utils/checksums.py b/django/utils/checksums.py
index 40d6814d52..c74631acb2 100644
--- a/django/utils/checksums.py
+++ b/django/utils/checksums.py
@@ -7,12 +7,12 @@ __all__ = ['luhn']
import warnings
from django.utils import six
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
warnings.warn(
- "django.utils.checksums will be removed in Django 2.0. The "
+ "django.utils.checksums will be removed in Django 1.10. The "
"luhn() function is now included in django-localflavor 1.1+.",
- RemovedInDjango20Warning
+ RemovedInDjango110Warning
)
LUHN_ODD_LOOKUP = (0, 2, 4, 6, 8, 1, 3, 5, 7, 9) # sum_of_digits(index * 2)
diff --git a/django/utils/deprecation.py b/django/utils/deprecation.py
index 3b8dd1f3a4..df2f701b71 100644
--- a/django/utils/deprecation.py
+++ b/django/utils/deprecation.py
@@ -4,15 +4,15 @@ import inspect
import warnings
-class RemovedInDjango21Warning(PendingDeprecationWarning):
+class RemovedInDjango20Warning(PendingDeprecationWarning):
pass
-class RemovedInDjango20Warning(DeprecationWarning):
+class RemovedInDjango110Warning(DeprecationWarning):
pass
-RemovedInNextVersionWarning = RemovedInDjango20Warning
+RemovedInNextVersionWarning = RemovedInDjango110Warning
class warn_about_renamed_method(object):
diff --git a/django/utils/feedgenerator.py b/django/utils/feedgenerator.py
index bb18bd6064..9b1421160b 100644
--- a/django/utils/feedgenerator.py
+++ b/django/utils/feedgenerator.py
@@ -27,7 +27,7 @@ import datetime
import warnings
from django.utils import datetime_safe, six
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
from django.utils.encoding import force_text, iri_to_uri
from django.utils.six import StringIO
from django.utils.six.moves.urllib.parse import urlparse
@@ -268,7 +268,7 @@ class RssFeed(SyndicationFeed):
warnings.warn(
'The mime_type attribute of RssFeed is deprecated. '
'Use content_type instead.',
- RemovedInDjango21Warning, stacklevel=2
+ RemovedInDjango20Warning, stacklevel=2
)
return self.content_type
@@ -426,7 +426,7 @@ class Atom1Feed(SyndicationFeed):
warnings.warn(
'The mime_type attribute of Atom1Feed is deprecated. '
'Use content_type instead.',
- RemovedInDjango21Warning, stacklevel=2
+ RemovedInDjango20Warning, stacklevel=2
)
return self.content_type
diff --git a/django/utils/html.py b/django/utils/html.py
index bbdc03f3c6..c038ac61f6 100644
--- a/django/utils/html.py
+++ b/django/utils/html.py
@@ -6,7 +6,7 @@ import re
import warnings
from django.utils import six
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import force_str, force_text
from django.utils.functional import allow_lazy
from django.utils.http import RFC3986_GENDELIMS, RFC3986_SUBDELIMS
@@ -190,7 +190,7 @@ def remove_tags(html, tags):
warnings.warn(
"django.utils.html.remove_tags() and the removetags template filter "
"are deprecated. Consider using the bleach library instead.",
- RemovedInDjango20Warning, stacklevel=3
+ RemovedInDjango110Warning, stacklevel=3
)
tags = [re.escape(tag) for tag in tags.split()]
tags_re = '(%s)' % '|'.join(tags)
@@ -212,7 +212,7 @@ def strip_entities(value):
"""Returns the given HTML with all entities (&something;) stripped."""
warnings.warn(
"django.utils.html.strip_entities() is deprecated.",
- RemovedInDjango20Warning, stacklevel=2
+ RemovedInDjango110Warning, stacklevel=2
)
return re.sub(r'&(?:\w+|#\d+);', '', force_text(value))
strip_entities = allow_lazy(strip_entities, six.text_type)
diff --git a/django/views/generic/edit.py b/django/views/generic/edit.py
index 3d3ff45686..9120e1dd76 100644
--- a/django/views/generic/edit.py
+++ b/django/views/generic/edit.py
@@ -6,14 +6,14 @@ from django.core.exceptions import ImproperlyConfigured
from django.forms import models as model_forms
from django.http import HttpResponseRedirect
from django.utils import six
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import force_text
from django.views.generic.base import ContextMixin, TemplateResponseMixin, View
from django.views.generic.detail import (
BaseDetailView, SingleObjectMixin, SingleObjectTemplateResponseMixin,
)
-PERCENT_PLACEHOLDER_REGEX = re.compile(r'%\([^\)]+\)') # RemovedInDjango20Warning
+PERCENT_PLACEHOLDER_REGEX = re.compile(r'%\([^\)]+\)') # RemovedInDjango110Warning
class FormMixinBase(type):
@@ -26,7 +26,7 @@ class FormMixinBase(type):
warnings.warn(
"`%s.%s.get_form` method must define a default value for "
"its `form_class` argument." % (attrs['__module__'], name),
- RemovedInDjango20Warning, stacklevel=2
+ RemovedInDjango110Warning, stacklevel=2
)
def get_form_with_form_class(self, form_class=None):
@@ -179,7 +179,7 @@ class ModelFormMixin(FormMixin, SingleObjectMixin):
warnings.warn(
"%()s placeholder style in success_url is deprecated. "
"Please replace them by the {} Python format syntax.",
- RemovedInDjango20Warning, stacklevel=2
+ RemovedInDjango110Warning, stacklevel=2
)
url = self.success_url % self.object.__dict__
else:
@@ -314,7 +314,7 @@ class DeletionMixin(object):
warnings.warn(
"%()s placeholder style in success_url is deprecated. "
"Please replace them by the {} Python format syntax.",
- RemovedInDjango20Warning, stacklevel=2
+ RemovedInDjango110Warning, stacklevel=2
)
return self.success_url % self.object.__dict__
else:
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt
index 1737681f88..67f2982292 100644
--- a/docs/internals/deprecation.txt
+++ b/docs/internals/deprecation.txt
@@ -7,9 +7,9 @@ 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-2.1:
+.. _deprecation-removed-in-2.0:
-2.1
+2.0
---
See the :ref:`Django 1.9 release notes<deprecated-features-1.9>` for more
@@ -79,10 +79,10 @@ details on these changes.
* Support for setting a URL instance namespace without an application
namespace will be removed.
-.. _deprecation-removed-in-2.0:
+.. _deprecation-removed-in-1.10:
-2.0
----
+1.10
+----
See the :ref:`Django 1.8 release notes<deprecated-features-1.8>` for more
details on these changes.
diff --git a/docs/ref/class-based-views/mixins-editing.txt b/docs/ref/class-based-views/mixins-editing.txt
index a5cbfcc437..5456215cf1 100644
--- a/docs/ref/class-based-views/mixins-editing.txt
+++ b/docs/ref/class-based-views/mixins-editing.txt
@@ -164,7 +164,7 @@ ModelFormMixin
Support for the new brace-based Python formatting syntax has been
added. The old ``%(slug)s`` placeholder syntax support has been
- deprecated and will be removed in Django 2.0.
+ deprecated and will be removed in Django 1.10.
.. method:: get_form_class()
@@ -263,7 +263,7 @@ DeletionMixin
Support for the new brace-based Python formatting syntax has been
added. The old ``%(slug)s`` placeholder syntax support has been
- deprecated and will be removed in Django 2.0.
+ deprecated and will be removed in Django 1.10.
.. method:: get_success_url()
diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt
index 305b57fbce..dbade5c5d9 100644
--- a/docs/ref/forms/fields.txt
+++ b/docs/ref/forms/fields.txt
@@ -830,7 +830,7 @@ For each field, we describe the default widget used if you don't specify
.. deprecated:: 1.8
The optional argument ``error_message`` is also accepted for backwards
- compatibility but will be removed in Django 2.0. The preferred way to
+ compatibility but will be removed in Django 1.10. The preferred way to
provide an error message is to use the :attr:`~Field.error_messages`
argument, passing a dictionary with ``'invalid'`` as a key and the error
message as the value.
diff --git a/docs/ref/models/meta.txt b/docs/ref/models/meta.txt
index d972e9b5eb..d8f711b810 100644
--- a/docs/ref/models/meta.txt
+++ b/docs/ref/models/meta.txt
@@ -151,7 +151,7 @@ Migrating from the old API
As part of the formalization of the ``Model._meta`` API (from the
:class:`django.db.models.options.Options` class), a number of methods and
-properties have been deprecated and will be removed in Django 2.0.
+properties have been deprecated and will be removed in Django 1.10.
These old APIs can be replicated by either:
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
index c7200d1475..71588532d5 100644
--- a/docs/ref/settings.txt
+++ b/docs/ref/settings.txt
@@ -109,7 +109,7 @@ Default: ``[]`` (Empty list)
.. deprecated:: 1.8
This setting, along with the :ttag:`ssi` template tag, is deprecated and
- will be removed in Django 2.0.
+ will be removed in Django 1.10.
.. versionchanged:: 1.8
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
index 7dba5d364c..95ec7c19cd 100644
--- a/docs/ref/templates/builtins.txt
+++ b/docs/ref/templates/builtins.txt
@@ -994,7 +994,7 @@ ssi
.. deprecated:: 1.8
- This tag has been deprecated and will be removed in Django 2.0. Use the
+ This tag has been deprecated and will be removed in Django 1.10. Use the
:ttag:`include` tag instead.
Outputs the contents of a given file into the page.
@@ -1139,7 +1139,7 @@ by the context as to the current application.
.. deprecated:: 1.8
The dotted Python path syntax is deprecated and will be removed in
- Django 2.0::
+ Django 1.10::
{% url 'path.to.some_view' v1 v2 %}
@@ -2320,7 +2320,7 @@ contains ``['States', ['Kansas', ['Lawrence', 'Topeka'], 'Illinois']]``, then
An older, more restrictive and verbose input format is also supported:
``['States', [['Kansas', [['Lawrence', []], ['Topeka', []]]], ['Illinois', []]]]``.
- Support for this syntax will be removed in Django 2.0.
+ Support for this syntax will be removed in Django 1.10.
.. templatefilter:: upper
diff --git a/docs/ref/templates/upgrading.txt b/docs/ref/templates/upgrading.txt
index 6fdab53c40..de2c6558ff 100644
--- a/docs/ref/templates/upgrading.txt
+++ b/docs/ref/templates/upgrading.txt
@@ -150,7 +150,7 @@ You should write::
Passing a :class:`~django.template.Context` or a
:class:`~django.template.RequestContext` is still possible when the template
is loaded by a :class:`~django.template.backends.django.DjangoTemplates`
-backend but it's deprecated and won't be supported in Django 2.0.
+backend but it's deprecated and won't be supported in Django 1.10.
If you're loading a template while you're rendering another template with the
Django template language and you have access to the current context, for
diff --git a/docs/ref/urls.txt b/docs/ref/urls.txt
index 0cdd29eef3..dac6edc96d 100644
--- a/docs/ref/urls.txt
+++ b/docs/ref/urls.txt
@@ -119,7 +119,7 @@ parameter is useful.
.. deprecated:: 1.8
Support for string ``view`` arguments is deprecated and will be removed in
- Django 2.0. Pass the callable instead.
+ Django 1.10. Pass the callable instead.
The ``prefix`` parameter has the same meaning as the first argument to
``patterns()`` and is only relevant when you're passing a string as the
@@ -163,15 +163,15 @@ See :ref:`including-other-urlconfs` and :ref:`namespaces-and-include`.
.. deprecated:: 1.9
Support for the ``app_name`` argument is deprecated and will be removed in
- Django 2.1. Specify the ``app_name`` as explained in
+ Django 2.0. Specify the ``app_name`` as explained in
:ref:`namespaces-and-include` instead.
Support for passing a 3-tuple is also deprecated and will be removed in
- Django 2.1. Pass a 2-tuple containing the pattern list and application
+ Django 2.0. Pass a 2-tuple containing the pattern list and application
namespace, and use the ``namespace`` argument instead.
Lastly, support for an instance namespace without an application namespace
- has been deprecated and will be removed in Django 2.1. Specify the
+ has been deprecated and will be removed in Django 2.0. Specify the
application namespace or remove the instance namespace.
handler400
diff --git a/docs/releases/1.8.3.txt b/docs/releases/1.8.3.txt
index 90008e184e..38bcaf5374 100644
--- a/docs/releases/1.8.3.txt
+++ b/docs/releases/1.8.3.txt
@@ -6,6 +6,11 @@ Django 1.8.3 release notes
Django 1.8.3 fixes several bugs in 1.8.2.
+Also, ``django.utils.deprecation.RemovedInDjango20Warning`` was renamed to
+``RemovedInDjango110Warning`` as the version roadmap was revised to 1.9, 1.10,
+1.11 (LTS), 2.0 (drops Python 2 support). For backwards compatibility,
+``RemovedInDjango20Warning`` remains as an importable alias.
+
Bugfixes
========
diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt
index 2829771edd..04e27fd3d4 100644
--- a/docs/releases/1.8.txt
+++ b/docs/releases/1.8.txt
@@ -380,7 +380,7 @@ Generic Views
* Placeholders in :attr:`ModelFormMixin.success_url
<django.views.generic.edit.ModelFormMixin.success_url>` now support the Python
:py:meth:`str.format()` syntax. The legacy ``%(<foo>)s`` syntax is still
- supported but will be removed in Django 2.0.
+ supported but will be removed in Django 1.10.
Internationalization
^^^^^^^^^^^^^^^^^^^^
@@ -1182,7 +1182,7 @@ Selected methods in ``django.db.models.options.Options``
As part of the formalization of the ``Model._meta`` API (from the
:class:`django.db.models.options.Options` class), a number of methods have been
-deprecated and will be removed in Django 2.0:
+deprecated and will be removed in Django 1.10:
* ``get_all_field_names()``
* ``get_all_related_objects()``
@@ -1203,7 +1203,7 @@ Loading ``cycle`` and ``firstof`` template tags from ``future`` library
Django 1.6 introduced ``{% load cycle from future %}`` and
``{% load firstof from future %}`` syntax for forward compatibility of the
:ttag:`cycle` and :ttag:`firstof` template tags. This syntax is now deprecated
-and will be removed in Django 2.0. You can simply remove the
+and will be removed in Django 1.10. You can simply remove the
``{% load ... from future %}`` tags.
``django.conf.urls.patterns()``
@@ -1289,7 +1289,7 @@ Built-in template context processors have been moved to
The attribute :attr:`SimpleTestCase.urls <django.test.SimpleTestCase.urls>`
for specifying URLconf configuration in tests has been deprecated and will be
-removed in Django 2.0. Use :func:`@override_settings(ROOT_URLCONF=...)
+removed in Django 1.10. Use :func:`@override_settings(ROOT_URLCONF=...)
<django.test.override_settings>` instead.
``prefix`` argument to :func:`~django.conf.urls.i18n.i18n_patterns`
@@ -1303,7 +1303,7 @@ Using an incorrect count of unpacked values in the :ttag:`for` template tag
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Using an incorrect count of unpacked values in :ttag:`for` tag will raise an
-exception rather than fail silently in Django 2.0.
+exception rather than fail silently in Django 1.10.
Passing a dotted path to :func:`~django.core.urlresolvers.reverse()` and :ttag:`url`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1321,7 +1321,7 @@ the ``url`` that references :func:`django.contrib.sitemaps.views.sitemap`::
url(r'^sitemap\.xml$', sitemap, {'sitemaps': sitemaps},
name='django.contrib.sitemaps.views.sitemap')
-to ensure compatibility when reversing by Python path is removed in Django 2.0.
+to ensure compatibility when reversing by Python path is removed in Django 1.10.
Similarly for GIS sitemaps, add ``name='django.contrib.gis.sitemaps.views.kml'``
or ``name='django.contrib.gis.sitemaps.views.kmz'``.
@@ -1335,7 +1335,7 @@ The ``django.db.models.sql.aggregates`` and
``django.contrib.gis.db.models.sql.aggregates`` modules (both private API), have
been deprecated as ``django.db.models.aggregates`` and
``django.contrib.gis.db.models.aggregates`` are now also responsible
-for SQL generation. The old modules will be removed in Django 2.0.
+for SQL generation. The old modules will be removed in Django 1.10.
If you were using the old modules, see :doc:`Query Expressions
</ref/models/expressions>` for instructions on rewriting custom aggregates
@@ -1343,7 +1343,7 @@ using the new stable API.
The following methods and properties of ``django.db.models.sql.query.Query``
have also been deprecated and the backwards compatibility shims will be removed
-in Django 2.0:
+in Django 1.10:
* ``Query.aggregates``, replaced by ``annotations``.
* ``Query.aggregate_select``, replaced by ``annotation_select``.
@@ -1366,14 +1366,14 @@ arguments through ``argparse.add_argument()``. See
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The class :class:`~django.core.management.NoArgsCommand` is now deprecated and
-will be removed in Django 2.0. Use :class:`~django.core.management.BaseCommand`
+will be removed in Django 1.10. Use :class:`~django.core.management.BaseCommand`
instead, which takes no arguments by default.
Listing all migrations in a project
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``--list`` option of the :djadmin:`migrate` management command is
-deprecated and will be removed in Django 2.0. Use :djadmin:`showmigrations`
+deprecated and will be removed in Django 1.10. Use :djadmin:`showmigrations`
instead.
``cache_choices`` option of ``ModelChoiceField`` and ``ModelMultipleChoiceField``
@@ -1421,7 +1421,7 @@ Using the new syntax, this becomes::
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rename this method to :meth:`~django.forms.Field.has_changed` by removing the
-leading underscore. The old name will still work until Django 2.0.
+leading underscore. The old name will still work until Django 1.10.
``django.utils.html.remove_tags()`` and ``removetags`` template filter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1443,7 +1443,7 @@ It's a legacy option that should no longer be necessary.
~~~~~~~~~~~~~~~~
``django.db.models.fields.subclassing.SubfieldBase`` has been deprecated and
-will be removed in Django 2.0. Historically, it was used to handle fields where
+will be removed in Django 1.10. Historically, it was used to handle fields where
type conversion was needed when loading from the database, but it was not used
in ``.values()`` calls or in aggregates. It has been replaced with
:meth:`~django.db.models.Field.from_db_value`. Note that the new approach does
@@ -1454,7 +1454,7 @@ as was the case with ``SubfieldBase``.
~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``django.utils.checksums`` module has been deprecated and will be removed
-in Django 2.0. The functionality it provided (validating checksum using the
+in Django 1.10. The functionality it provided (validating checksum using the
Luhn algorithm) was undocumented and not used in Django. The module has been
moved to the `django-localflavor`_ package (version 1.1+).
@@ -1464,7 +1464,7 @@ moved to the `django-localflavor`_ package (version 1.1+).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``original_content_type_id`` attribute on ``InlineAdminForm`` has been
-deprecated and will be removed in Django 2.0. Historically, it was used
+deprecated and will be removed in Django 1.10. Historically, it was used
to construct the "view on site" URL. This URL is now accessible using the
``absolute_url`` attribute of the form.
@@ -1511,7 +1511,7 @@ for details.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following functions and classes will no longer accept a ``current_app``
-parameter to set an URL namespace in Django 2.0:
+parameter to set an URL namespace in Django 1.10:
* ``django.shortcuts.render()``
* ``django.template.Context()``
@@ -1526,7 +1526,7 @@ to these functions or classes. If you're using a plain ``Context``, use a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following functions will no longer accept the ``dictionary`` and
-``context_instance`` parameters in Django 2.0:
+``context_instance`` parameters in Django 1.10:
* ``django.shortcuts.render()``
* ``django.shortcuts.render_to_response()``
@@ -1544,7 +1544,7 @@ pass a :class:`dict` in the ``context`` parameter instead. If you're passing a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following functions will no longer accept a ``dirs`` parameter to override
-``TEMPLATE_DIRS`` in Django 2.0:
+``TEMPLATE_DIRS`` in Django 1.10:
* :func:`django.template.loader.get_template()`
* :func:`django.template.loader.select_template()`
@@ -1576,7 +1576,7 @@ Support for the ``max_length`` argument on custom ``Storage`` classes
:meth:`~django.core.files.storage.Storage.get_available_name` and/or
:meth:`~django.core.files.storage.Storage.save` if they override either method.
Support for storages that do not accept this argument will be removed in
-Django 2.0.
+Django 1.10.
``qn`` replaced by ``compiler``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1608,7 +1608,7 @@ added in Django 1.7. In Django 1.7.2, its functionality was moved to
``'django.contrib.auth.middleware.SessionAuthenticationMiddleware'`` appears in
:setting:`MIDDLEWARE_CLASSES`.
-In Django 2.0, session verification will be enabled regardless of whether or not
+In Django 1.10, session verification will be enabled regardless of whether or not
``SessionAuthenticationMiddleware`` is enabled (at which point
``SessionAuthenticationMiddleware`` will have no significance). You can add it
to your ``MIDDLEWARE_CLASSES`` sometime before then to opt-in. Please read the
@@ -1629,7 +1629,7 @@ of ``Field.rel``. The latter is an instance of
``django.db.models.fields.related.ForeignObjectRel`` which replaces
``django.db.models.related.RelatedObject``. The ``django.db.models.related``
module has been removed and the ``Field.related`` attribute will be removed in
-Django 2.0.
+Django 1.10.
``ssi`` template tag
~~~~~~~~~~~~~~~~~~~~
@@ -1637,7 +1637,7 @@ Django 2.0.
The :ttag:`ssi` template tag allows files to be included in a template by
absolute path. This is of limited use in most deployment situations, and
the :ttag:`include` tag often makes more sense. This tag is now deprecated and
-will be removed in Django 2.0.
+will be removed in Django 1.10.
``=`` as comparison operator in ``if`` template tag
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1650,7 +1650,7 @@ testing was undocumented and untested. It's now deprecated in favor of ``==``.
The legacy ``%(<foo>)s`` syntax in :attr:`ModelFormMixin.success_url
<django.views.generic.edit.ModelFormMixin.success_url>` is deprecated and
-will be removed in Django 2.0.
+will be removed in Django 1.10.
``GeoQuerySet`` aggregate methods
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/docs/releases/1.9.txt b/docs/releases/1.9.txt
index 77d7c09ed3..3a105fd3b6 100644
--- a/docs/releases/1.9.txt
+++ b/docs/releases/1.9.txt
@@ -643,7 +643,7 @@ queries, you should turn them into naive datetimes in UTC::
param = timezone.make_naive(param, timezone.utc)
If you fail to do so, Django 1.9 and 2.0 will perform the conversion like
-earlier versions but emit a deprecation warning. Django 2.1 won't perform any
+earlier versions but emit a deprecation warning. Django 2.0 won't perform any
conversion, which may result in data corruption.
If you're reading :class:`~datetime.datetime` values from the results, they
@@ -839,7 +839,7 @@ Miscellaneous
* The ``check_aggregate_support()`` method of
``django.db.backends.base.BaseDatabaseOperations`` has been deprecated and
- will be removed in Django 2.1. The more general ``check_expression_support()``
+ will be removed in Django 2.0. The more general ``check_expression_support()``
should be used instead.
* ``django.forms.extras`` is deprecated. You can find
diff --git a/docs/topics/auth/default.txt b/docs/topics/auth/default.txt
index cc8d0abc97..476d27584d 100644
--- a/docs/topics/auth/default.txt
+++ b/docs/topics/auth/default.txt
@@ -764,7 +764,7 @@ Session invalidation on password change
is enabled in :setting:`MIDDLEWARE_CLASSES`. It's included if
``settings.py`` was generated by :djadmin:`startproject` on Django ≥ 1.7.
- Session verification will become mandatory in Django 2.0 regardless of
+ Session verification will become mandatory in Django 1.10 regardless of
whether or not ``SessionAuthenticationMiddleware`` is enabled. If you have
a pre-1.7 project or one generated using a template that doesn't include
``SessionAuthenticationMiddleware``, consider enabling it before then after
@@ -1215,7 +1215,7 @@ implementation details see :ref:`using-the-views`.
.. deprecated:: 1.8
The ``is_admin_site`` argument is deprecated and will be removed in
- Django 2.0.
+ Django 1.10.
**Template context:**
diff --git a/docs/topics/http/shortcuts.txt b/docs/topics/http/shortcuts.txt
index ae021a8513..17cac33707 100644
--- a/docs/topics/http/shortcuts.txt
+++ b/docs/topics/http/shortcuts.txt
@@ -49,7 +49,7 @@ Optional arguments
.. versionchanged:: 1.8
The ``context`` argument used to be called ``dictionary``. That name
- is deprecated in Django 1.8 and will be removed in Django 2.0.
+ is deprecated in Django 1.8 and will be removed in Django 1.10.
``context_instance``
The context instance to render the template with. By default, the template
@@ -142,7 +142,7 @@ Optional arguments
.. versionchanged:: 1.8
The ``context`` argument used to be called ``dictionary``. That name
- is deprecated in Django 1.8 and will be removed in Django 2.0.
+ is deprecated in Django 1.8 and will be removed in Django 1.10.
``context_instance``
The context instance to render the template with. By default, the template
diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt
index 8bc5602209..1ab2dae273 100644
--- a/docs/topics/i18n/translation.txt
+++ b/docs/topics/i18n/translation.txt
@@ -1267,7 +1267,7 @@ Language prefix in URL patterns
.. deprecated:: 1.8
The ``prefix`` argument to ``i18n_patterns()`` has been deprecated and will
- not be supported in Django 2.0. Simply pass a list of
+ not be supported in Django 1.10. Simply pass a list of
:func:`django.conf.urls.url` instances instead.
This function can be used in your root URLconf and Django will automatically
diff --git a/docs/topics/signals.txt b/docs/topics/signals.txt
index cc01a172ad..0edc2a5964 100644
--- a/docs/topics/signals.txt
+++ b/docs/topics/signals.txt
@@ -285,4 +285,4 @@ may be ``None`` if ``dispatch_uid`` is used to identify the receiver.
.. deprecated:: 1.9
The ``weak`` argument is deprecated as it has no effect. It will be removed
- in Django 2.1.
+ in Django 2.0.
diff --git a/docs/topics/templates.txt b/docs/topics/templates.txt
index 66bb8314d6..4e0e1db646 100644
--- a/docs/topics/templates.txt
+++ b/docs/topics/templates.txt
@@ -286,7 +286,7 @@ templates, Django provides a shortcut function which automates the process.
.. versionchanged:: 1.8
The ``context`` argument used to be called ``dictionary``. That name
- is deprecated in Django 1.8 and will be removed in Django 2.0.
+ is deprecated in Django 1.8 and will be removed in Django 1.10.
``context`` is now optional. An empty context will be used if it
isn't provided.
diff --git a/tests/admin_inlines/tests.py b/tests/admin_inlines/tests.py
index 19260baf4d..d5807ba278 100644
--- a/tests/admin_inlines/tests.py
+++ b/tests/admin_inlines/tests.py
@@ -433,7 +433,7 @@ class TestInlineAdminForm(TestCase):
self.assertEqual(
msg,
'InlineAdminForm.original_content_type_id is deprecated and will be '
- 'removed in Django 2.0. If you were using this attribute to construct '
+ 'removed in Django 1.10. If you were using this attribute to construct '
'the "view on site" URL, use the `absolute_url` attribute instead.'
)
self.assertEqual(iaf2.original_content_type_id, poll_ct.id)
diff --git a/tests/aggregation/tests.py b/tests/aggregation/tests.py
index 8f3c9fb410..5b0bcb82bc 100644
--- a/tests/aggregation/tests.py
+++ b/tests/aggregation/tests.py
@@ -13,7 +13,7 @@ from django.db.models import (
from django.test import TestCase, ignore_warnings
from django.test.utils import Approximate, CaptureQueriesContext
from django.utils import six, timezone
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from .models import Author, Book, Publisher, Store
@@ -1068,7 +1068,7 @@ class AggregateTestCase(TestCase):
self.assertQuerysetEqual(
qs2, [1, 3], lambda v: v.num_awards)
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_backwards_compatibility(self):
from django.db.models.sql import aggregates as sql_aggregates
diff --git a/tests/auth_tests/test_views.py b/tests/auth_tests/test_views.py
index 033d083e18..7b497ac458 100644
--- a/tests/auth_tests/test_views.py
+++ b/tests/auth_tests/test_views.py
@@ -28,7 +28,7 @@ from django.test import (
TestCase, ignore_warnings, modify_settings, override_settings,
)
from django.test.utils import patch_logger
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import force_text
from django.utils.http import urlquote
from django.utils.six.moves.urllib.parse import ParseResult, urlparse
@@ -197,7 +197,7 @@ class PasswordResetTest(AuthViewsTestCase):
self.assertEqual(len(mail.outbox), 1)
self.assertEqual("staffmember@example.com", mail.outbox[0].from_email)
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@override_settings(ALLOWED_HOSTS=['adminsite.com'])
def test_admin_reset(self):
"If the reset view is marked as being for admin, the HTTP_HOST header is used for a domain override."
diff --git a/tests/deprecation/tests.py b/tests/deprecation/tests.py
index ccc4f2351b..8f4ccf4eb5 100644
--- a/tests/deprecation/tests.py
+++ b/tests/deprecation/tests.py
@@ -195,5 +195,5 @@ class DeprecatingSimpleTestCaseUrls(unittest.TestCase):
msg = force_text(recorded.pop().message)
self.assertEqual(msg,
"SimpleTestCase.urls is deprecated and will be removed in "
- "Django 2.0. Use @override_settings(ROOT_URLCONF=...) "
+ "Django 1.10. Use @override_settings(ROOT_URLCONF=...) "
"in TempTestCase instead.")
diff --git a/tests/field_subclassing/fields.py b/tests/field_subclassing/fields.py
index 3bfdb5a89c..d1385646a8 100644
--- a/tests/field_subclassing/fields.py
+++ b/tests/field_subclassing/fields.py
@@ -5,14 +5,14 @@ import warnings
from django.db import models
from django.utils import six
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import force_text, python_2_unicode_compatible
-# Catch warning about subfieldbase -- remove in Django 2.0
+# Catch warning about subfieldbase -- remove in Django 1.10
warnings.filterwarnings(
'ignore',
'SubfieldBase has been deprecated. Use Field.from_db_value instead.',
- RemovedInDjango20Warning
+ RemovedInDjango110Warning
)
diff --git a/tests/file_storage/tests.py b/tests/file_storage/tests.py
index f8c1c43e08..9aea27420d 100644
--- a/tests/file_storage/tests.py
+++ b/tests/file_storage/tests.py
@@ -568,13 +568,13 @@ class FileFieldStorageTests(TestCase):
str(warns[0].message),
'Backwards compatibility for storage backends without support for '
'the `max_length` argument in Storage.save() will be removed in '
- 'Django 2.0.'
+ 'Django 1.10.'
)
self.assertEqual(
str(warns[1].message),
'Backwards compatibility for storage backends without support for '
'the `max_length` argument in Storage.get_available_name() will '
- 'be removed in Django 2.0.'
+ 'be removed in Django 1.10.'
)
self.assertEqual(obj.old_style.name, 'tests/deprecated_storage_test.txt')
self.assertEqual(obj.old_style.read(), b'Same Content')
diff --git a/tests/forms_tests/tests/test_fields.py b/tests/forms_tests/tests/test_fields.py
index 4224a94725..41ed7b5f45 100644
--- a/tests/forms_tests/tests/test_fields.py
+++ b/tests/forms_tests/tests/test_fields.py
@@ -47,7 +47,7 @@ from django.forms import (
from django.test import SimpleTestCase, ignore_warnings
from django.utils import formats, six, translation
from django.utils._os import upath
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.duration import duration_string
try:
@@ -513,7 +513,7 @@ class FieldsTests(SimpleTestCase):
f = DateField()
self.assertRaisesMessage(ValidationError, "'Enter a valid date.'", f.clean, 'a\x00b')
- @ignore_warnings(category=RemovedInDjango20Warning) # for _has_changed
+ @ignore_warnings(category=RemovedInDjango110Warning) # for _has_changed
def test_datefield_changed(self):
format = '%d/%m/%Y'
f = DateField(input_formats=[format])
@@ -692,7 +692,7 @@ class FieldsTests(SimpleTestCase):
self.assertRaisesMessage(ValidationError, "'Enter a valid value.'", f.clean, ' 2A2')
self.assertRaisesMessage(ValidationError, "'Enter a valid value.'", f.clean, '2A2 ')
- @ignore_warnings(category=RemovedInDjango20Warning) # error_message deprecation
+ @ignore_warnings(category=RemovedInDjango110Warning) # error_message deprecation
def test_regexfield_4(self):
f = RegexField('^[0-9][0-9][0-9][0-9]$', error_message='Enter a four-digit number.')
self.assertEqual('1234', f.clean('1234'))
diff --git a/tests/generic_views/test_edit.py b/tests/generic_views/test_edit.py
index 3cc5318947..e93965a670 100644
--- a/tests/generic_views/test_edit.py
+++ b/tests/generic_views/test_edit.py
@@ -9,7 +9,7 @@ from django.test import (
SimpleTestCase, TestCase, ignore_warnings, override_settings,
)
from django.test.client import RequestFactory
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.views.generic.base import View
from django.views.generic.edit import CreateView, FormMixin, ModelFormMixin
@@ -72,7 +72,7 @@ class FormMixinTests(SimpleTestCase):
def get_form(self, form_class):
return form_class(**self.get_form_kwargs())
self.assertEqual(len(w), 1)
- self.assertEqual(w[0].category, RemovedInDjango20Warning)
+ self.assertEqual(w[0].category, RemovedInDjango110Warning)
self.assertEqual(
str(w[0].message),
'`generic_views.test_edit.MissingDefaultValue.get_form` method '
@@ -152,7 +152,7 @@ class CreateViewTests(TestCase):
self.assertRedirects(res, '/edit/authors/create/')
self.assertQuerysetEqual(Author.objects.all(), ['<Author: Randall Munroe>'])
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_create_with_interpolated_redirect(self):
res = self.client.post(
'/edit/authors/create/interpolate_redirect/',
@@ -292,7 +292,7 @@ class UpdateViewTests(TestCase):
self.assertRedirects(res, '/edit/authors/create/')
self.assertQuerysetEqual(Author.objects.all(), ['<Author: Randall Munroe (author of xkcd)>'])
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_update_with_interpolated_redirect(self):
a = Author.objects.create(
name='Randall Munroe',
@@ -399,7 +399,7 @@ class DeleteViewTests(TestCase):
self.assertRedirects(res, '/edit/authors/create/')
self.assertQuerysetEqual(Author.objects.all(), [])
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_delete_with_interpolated_redirect(self):
a = Author.objects.create(**{'name': 'Randall Munroe', 'slug': 'randall-munroe'})
res = self.client.post('/edit/author/%d/delete/interpolate_redirect/' % a.pk)
diff --git a/tests/gis_tests/distapp/tests.py b/tests/gis_tests/distapp/tests.py
index c18763cad4..c9c0d8dbcc 100644
--- a/tests/gis_tests/distapp/tests.py
+++ b/tests/gis_tests/distapp/tests.py
@@ -8,7 +8,7 @@ from django.contrib.gis.measure import D # alias for Distance
from django.db import connection
from django.db.models import Q
from django.test import TestCase, ignore_warnings, skipUnlessDBFeature
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
from ..utils import no_oracle, oracle, postgis, spatialite
from .models import (
@@ -97,7 +97,7 @@ class DistanceTest(TestCase):
self.assertListEqual(au_cities, self.get_names(qs.filter(point__dwithin=(self.au_pnt, dist))))
@skipUnlessDBFeature("has_distance_method")
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_distance_projected(self):
"""
Test the `distance` GeoQuerySet method on projected coordinate systems.
@@ -141,7 +141,7 @@ class DistanceTest(TestCase):
self.assertAlmostEqual(ft_distances[i], c.distance.survey_ft, tol)
@skipUnlessDBFeature("has_distance_method", "supports_distance_geodetic")
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_distance_geodetic(self):
"""
Test the `distance` GeoQuerySet method on geodetic coordinate systems.
@@ -203,7 +203,7 @@ class DistanceTest(TestCase):
@no_oracle # Oracle already handles geographic distance calculation.
@skipUnlessDBFeature("has_distance_method")
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_distance_transform(self):
"""
Test the `distance` GeoQuerySet method used with `transform` on a geographic field.
@@ -324,7 +324,7 @@ class DistanceTest(TestCase):
self.assertEqual(cities, ['Adelaide', 'Hobart', 'Shellharbour', 'Thirroul'])
@skipUnlessDBFeature("has_area_method")
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_area(self):
"""
Test the `area` GeoQuerySet method.
@@ -338,7 +338,7 @@ class DistanceTest(TestCase):
self.assertAlmostEqual(area_sq_m[i], z.area.sq_m, tol)
@skipUnlessDBFeature("has_length_method")
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_length(self):
"""
Test the `length` GeoQuerySet method.
@@ -362,7 +362,7 @@ class DistanceTest(TestCase):
self.assertAlmostEqual(len_m2, i10.length.m, 2)
@skipUnlessDBFeature("has_perimeter_method")
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_perimeter(self):
"""
Test the `perimeter` GeoQuerySet method.
@@ -379,7 +379,7 @@ class DistanceTest(TestCase):
self.assertEqual(0, c.perim.m)
@skipUnlessDBFeature("has_area_method", "has_distance_method")
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_measurement_null_fields(self):
"""
Test the measurement GeoQuerySet methods on fields with NULL values.
@@ -394,7 +394,7 @@ class DistanceTest(TestCase):
self.assertIsNone(z.area)
@skipUnlessDBFeature("has_distance_method")
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_distance_order_by(self):
qs = SouthTexasCity.objects.distance(Point(3, 3)).order_by(
'distance'
diff --git a/tests/gis_tests/geo3d/tests.py b/tests/gis_tests/geo3d/tests.py
index 2feecaa417..31b440be4a 100644
--- a/tests/gis_tests/geo3d/tests.py
+++ b/tests/gis_tests/geo3d/tests.py
@@ -13,7 +13,7 @@ from django.contrib.gis.geos import GEOSGeometry, LineString, Point, Polygon
from django.test import TestCase, ignore_warnings, skipUnlessDBFeature
from django.utils._os import upath
from django.utils.deprecation import (
- RemovedInDjango20Warning, RemovedInDjango21Warning,
+ RemovedInDjango20Warning, RemovedInDjango110Warning,
)
from .models import (
@@ -173,7 +173,7 @@ class Geo3DTest(Geo3DLoadingHelper, TestCase):
lm.save()
self.assertEqual(3, MultiPoint3D.objects.count())
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_kml(self):
"""
Test GeoQuerySet.kml() with Z values.
@@ -185,7 +185,7 @@ class Geo3DTest(Geo3DLoadingHelper, TestCase):
ref_kml_regex = re.compile(r'^<Point><coordinates>-95.363\d+,29.763\d+,18</coordinates></Point>$')
self.assertTrue(ref_kml_regex.match(h.kml))
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_geojson(self):
"""
Test GeoQuerySet.geojson() with Z values.
@@ -217,7 +217,7 @@ class Geo3DTest(Geo3DLoadingHelper, TestCase):
self.assertSetEqual({p.ewkt for p in ref_union}, {p.ewkt for p in union})
@skipUnlessDBFeature("supports_3d_functions")
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_extent(self):
"""
Testing the Extent3D aggregate for 3D models.
@@ -237,7 +237,7 @@ class Geo3DTest(Geo3DLoadingHelper, TestCase):
self.assertIsNone(City3D.objects.none().extent3d())
self.assertIsNone(City3D.objects.none().aggregate(Extent3D('point'))['point__extent3d'])
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
@skipUnlessDBFeature("supports_3d_functions")
def test_perimeter(self):
"""
@@ -256,7 +256,7 @@ class Geo3DTest(Geo3DLoadingHelper, TestCase):
Polygon3D.objects.perimeter().get(name='3D BBox').perimeter.m,
tol)
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
@skipUnlessDBFeature("supports_3d_functions")
def test_length(self):
"""
@@ -290,7 +290,7 @@ class Geo3DTest(Geo3DLoadingHelper, TestCase):
InterstateProj3D.objects.length().get(name='I-45').length.m,
tol)
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
@skipUnlessDBFeature("supports_3d_functions")
def test_scale(self):
"""
@@ -303,7 +303,7 @@ class Geo3DTest(Geo3DLoadingHelper, TestCase):
for city in City3D.objects.scale(1.0, 1.0, zscale):
self.assertEqual(city_dict[city.name][2] * zscale, city.scale.z)
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
@skipUnlessDBFeature("supports_3d_functions")
def test_translate(self):
"""
diff --git a/tests/gis_tests/geoapp/test_sitemaps.py b/tests/gis_tests/geoapp/test_sitemaps.py
index 4bd8b8744e..288d003f21 100644
--- a/tests/gis_tests/geoapp/test_sitemaps.py
+++ b/tests/gis_tests/geoapp/test_sitemaps.py
@@ -10,7 +10,7 @@ from django.test import (
TestCase, ignore_warnings, modify_settings, override_settings,
skipUnlessDBFeature,
)
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from .models import City, Country
@@ -30,7 +30,7 @@ class GeoSitemapTest(TestCase):
expected = set(expected)
self.assertEqual(actual, expected)
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_geositemap_kml(self):
"Tests KML/KMZ geographic sitemaps."
for kml_type in ('kml', 'kmz'):
diff --git a/tests/gis_tests/geoapp/tests.py b/tests/gis_tests/geoapp/tests.py
index c54ffe4e9e..64af08aa77 100644
--- a/tests/gis_tests/geoapp/tests.py
+++ b/tests/gis_tests/geoapp/tests.py
@@ -14,7 +14,7 @@ from django.db import connection
from django.test import TestCase, ignore_warnings, skipUnlessDBFeature
from django.utils import six
from django.utils.deprecation import (
- RemovedInDjango20Warning, RemovedInDjango21Warning,
+ RemovedInDjango20Warning, RemovedInDjango110Warning,
)
from ..utils import no_oracle, oracle, postgis, spatialite
@@ -435,7 +435,7 @@ class GeoLookupTest(TestCase):
@skipUnlessDBFeature("gis_enabled")
-@ignore_warnings(category=RemovedInDjango21Warning)
+@ignore_warnings(category=RemovedInDjango20Warning)
class GeoQuerySetTest(TestCase):
fixtures = ['initial']
@@ -493,7 +493,7 @@ class GeoQuerySetTest(TestCase):
self.assertIsInstance(country.envelope, Polygon)
@skipUnlessDBFeature("supports_extent_aggr")
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_extent(self):
"""
Testing the (deprecated) `extent` GeoQuerySet method and the Extent
@@ -651,7 +651,7 @@ class GeoQuerySetTest(TestCase):
for ptown in [ptown1, ptown2]:
self.assertEqual('<Point><coordinates>-104.609252,38.255001</coordinates></Point>', ptown.kml)
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_make_line(self):
"""
Testing the (deprecated) `make_line` GeoQuerySet method and the MakeLine
@@ -863,7 +863,7 @@ class GeoQuerySetTest(TestCase):
# but this seems unexpected and should be investigated to determine the cause.
@skipUnlessDBFeature("has_unionagg_method")
@no_oracle
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_unionagg(self):
"""
Testing the (deprecated) `unionagg` (aggregate union) GeoQuerySet method
diff --git a/tests/gis_tests/geogapp/tests.py b/tests/gis_tests/geogapp/tests.py
index ec70e98d70..a92d6b4e2b 100644
--- a/tests/gis_tests/geogapp/tests.py
+++ b/tests/gis_tests/geogapp/tests.py
@@ -11,7 +11,7 @@ from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis.measure import D
from django.test import TestCase, ignore_warnings, skipUnlessDBFeature
from django.utils._os import upath
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
from ..utils import oracle, postgis
from .models import City, County, Zipcode
@@ -41,7 +41,7 @@ class GeographyTest(TestCase):
self.assertEqual(['Dallas', 'Houston', 'Oklahoma City'], cities)
@skipUnlessDBFeature("has_distance_method", "supports_distance_geodetic")
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test03_distance_method(self):
"Testing GeoQuerySet.distance() support on non-point geography fields."
# `GeoQuerySet.distance` is not allowed geometry fields.
@@ -94,7 +94,7 @@ class GeographyTest(TestCase):
self.assertEqual(state, c.state)
@skipUnlessDBFeature("has_area_method", "supports_distance_geodetic")
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test06_geography_area(self):
"Testing that Area calculations work on geography columns."
# SELECT ST_Area(poly) FROM geogapp_zipcode WHERE code='77002';
diff --git a/tests/gis_tests/relatedapp/tests.py b/tests/gis_tests/relatedapp/tests.py
index 97c42b5dc3..19b0f89eab 100644
--- a/tests/gis_tests/relatedapp/tests.py
+++ b/tests/gis_tests/relatedapp/tests.py
@@ -7,7 +7,7 @@ from django.db import connection
from django.test import TestCase, ignore_warnings, skipUnlessDBFeature
from django.test.utils import override_settings
from django.utils import timezone
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from ..utils import no_oracle
from .models import (
@@ -64,7 +64,7 @@ class RelatedGeoModelTest(TestCase):
check_pnt(GEOSGeometry(wkt, srid), qs[0].location.point)
@skipUnlessDBFeature("supports_extent_aggr")
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_related_extent_aggregate(self):
"Testing the `extent` GeoQuerySet aggregates on related geographic models."
# This combines the Extent and Union aggregates into one query
@@ -98,7 +98,7 @@ class RelatedGeoModelTest(TestCase):
)
@skipUnlessDBFeature("has_unionagg_method")
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_related_union_aggregate(self):
"Testing the `unionagg` GeoQuerySet aggregates on related geographic models."
# This combines the Extent and Union aggregates into one query
@@ -291,7 +291,7 @@ class RelatedGeoModelTest(TestCase):
self.assertIsNone(b.author)
@skipUnlessDBFeature("supports_collect_aggr")
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_collect(self):
"""
Testing the (deprecated) `collect` GeoQuerySet method and `Collect`
diff --git a/tests/i18n/urls.py b/tests/i18n/urls.py
index d63499f1bb..2485d1d11a 100644
--- a/tests/i18n/urls.py
+++ b/tests/i18n/urls.py
@@ -3,12 +3,12 @@ from __future__ import unicode_literals
from django.conf.urls.i18n import i18n_patterns
from django.http import HttpResponse, StreamingHttpResponse
from django.test import ignore_warnings
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.translation import ugettext_lazy as _
# test deprecated version of i18n_patterns() function (with prefix). Remove it
-# and convert to list of urls() in Django 2.0
-i18n_patterns = ignore_warnings(category=RemovedInDjango20Warning)(i18n_patterns)
+# and convert to list of urls() in Django 1.10
+i18n_patterns = ignore_warnings(category=RemovedInDjango110Warning)(i18n_patterns)
urlpatterns = i18n_patterns('',
(r'^simple/$', lambda r: HttpResponse()),
diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py
index 58344e50ce..d1bef38716 100644
--- a/tests/migrations/test_commands.py
+++ b/tests/migrations/test_commands.py
@@ -10,7 +10,7 @@ from django.core.management import CommandError, call_command
from django.db import DatabaseError, connection, models
from django.test import ignore_warnings, mock, override_settings
from django.utils import six
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import force_text
from .models import UnicodeModel, UnserializableModel
@@ -117,7 +117,7 @@ class MigrateTests(MigrationTestBase):
with self.assertRaisesMessage(CommandError, "Conflicting migrations detected"):
call_command("migrate", "migrations")
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@override_settings(MIGRATION_MODULES={"migrations": "migrations.test_migrations"})
def test_migrate_list(self):
"""
diff --git a/tests/model_meta/test_legacy.py b/tests/model_meta/test_legacy.py
index 917a7d4cf3..d93b5fc020 100644
--- a/tests/model_meta/test_legacy.py
+++ b/tests/model_meta/test_legacy.py
@@ -4,7 +4,7 @@ from django import test
from django.contrib.contenttypes.fields import GenericRelation
from django.core.exceptions import FieldDoesNotExist
from django.db.models.fields import CharField, related
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from .models import BasePerson, Person
from .results import TEST_RESULTS
@@ -26,11 +26,11 @@ class M2MTests(OptionsBaseTests):
with warnings.catch_warnings(record=True) as warning:
warnings.simplefilter("always")
models = [model for field, model in model._meta.get_m2m_with_model()]
- self.assertEqual([RemovedInDjango20Warning], [w.message.__class__ for w in warning])
+ self.assertEqual([RemovedInDjango110Warning], [w.message.__class__ for w in warning])
self.assertEqual(models, expected_result)
-@test.ignore_warnings(category=RemovedInDjango20Warning)
+@test.ignore_warnings(category=RemovedInDjango110Warning)
class RelatedObjectsTests(OptionsBaseTests):
key_name = lambda self, r: r[0]
@@ -83,7 +83,7 @@ class RelatedObjectsTests(OptionsBaseTests):
)
-@test.ignore_warnings(category=RemovedInDjango20Warning)
+@test.ignore_warnings(category=RemovedInDjango110Warning)
class RelatedM2MTests(OptionsBaseTests):
def test_related_m2m_with_model(self):
@@ -111,7 +111,7 @@ class RelatedM2MTests(OptionsBaseTests):
self.assertIn('friends_inherited_rel_+', [o.field.related_query_name() for o in related_m2m])
-@test.ignore_warnings(category=RemovedInDjango20Warning)
+@test.ignore_warnings(category=RemovedInDjango110Warning)
class GetFieldByNameTests(OptionsBaseTests):
def test_get_data_field(self):
@@ -149,15 +149,15 @@ class GetFieldByNameTests(OptionsBaseTests):
)
self.assertEqual(Person._meta.get_field('m2m_base', many_to_many=True).name, 'm2m_base')
- # 2 RemovedInDjango20Warning messages should be raised, one for each call of get_field()
+ # 2 RemovedInDjango110Warning messages should be raised, one for each call of get_field()
# with the 'many_to_many' argument.
self.assertEqual(
- [RemovedInDjango20Warning, RemovedInDjango20Warning],
+ [RemovedInDjango110Warning, RemovedInDjango110Warning],
[w.message.__class__ for w in warning]
)
-@test.ignore_warnings(category=RemovedInDjango20Warning)
+@test.ignore_warnings(category=RemovedInDjango110Warning)
class GetAllFieldNamesTestCase(OptionsBaseTests):
def test_get_all_field_names(self):
diff --git a/tests/multiple_database/tests.py b/tests/multiple_database/tests.py
index 1dadb3bea4..08493ffaf2 100644
--- a/tests/multiple_database/tests.py
+++ b/tests/multiple_database/tests.py
@@ -931,7 +931,7 @@ class RouterTestCase(TestCase):
def allow_migrate(self, db, model):
"""
Deprecated allow_migrate signature should trigger
- RemovedInDjango20Warning.
+ RemovedInDjango110Warning.
"""
assert db == 'default'
assert model is User
@@ -945,7 +945,7 @@ class RouterTestCase(TestCase):
"The signature of allow_migrate has changed from "
"allow_migrate(self, db, model) to "
"allow_migrate(self, db, app_label, model_name=None, **hints). "
- "Support for the old signature will be removed in Django 2.0."
+ "Support for the old signature will be removed in Django 1.10."
)
self.assertTrue(router.allow_migrate_model('default', User))
diff --git a/tests/resolve_url/tests.py b/tests/resolve_url/tests.py
index 14c0fbb364..d0c9d74abe 100644
--- a/tests/resolve_url/tests.py
+++ b/tests/resolve_url/tests.py
@@ -5,7 +5,7 @@ from django.core.urlresolvers import NoReverseMatch, reverse_lazy
from django.shortcuts import resolve_url
from django.test import SimpleTestCase, ignore_warnings, override_settings
from django.utils import six
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from .models import UnimportantThing
@@ -66,7 +66,7 @@ class ResolveUrlTests(SimpleTestCase):
self.assertIsInstance(resolved_url, six.text_type)
self.assertEqual('/accounts/logout/', resolved_url)
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_valid_view_name(self):
"""
Tests that passing a view function to ``resolve_url`` will result in
diff --git a/tests/runtests.py b/tests/runtests.py
index 12e78cad68..712441fd62 100755
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -17,12 +17,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,
+ RemovedInDjango20Warning, RemovedInDjango110Warning,
)
from django.utils.log import DEFAULT_LOGGING
+warnings.simplefilter("error", RemovedInDjango110Warning)
warnings.simplefilter("error", RemovedInDjango20Warning)
-warnings.simplefilter("error", RemovedInDjango21Warning)
RUNTESTS_DIR = os.path.abspath(os.path.dirname(upath(__file__)))
@@ -107,7 +107,7 @@ def setup(verbosity, test_labels):
state = {
'INSTALLED_APPS': settings.INSTALLED_APPS,
'ROOT_URLCONF': getattr(settings, "ROOT_URLCONF", ""),
- # Remove the following line in Django 2.0.
+ # Remove the following line in Django 1.10.
'TEMPLATE_DIRS': settings.TEMPLATE_DIRS,
'TEMPLATES': settings.TEMPLATES,
'LANGUAGE_CODE': settings.LANGUAGE_CODE,
@@ -121,7 +121,7 @@ def setup(verbosity, test_labels):
settings.ROOT_URLCONF = 'urls'
settings.STATIC_URL = '/static/'
settings.STATIC_ROOT = os.path.join(TMPDIR, 'static')
- # Remove the following line in Django 2.0.
+ # Remove the following line in Django 1.10.
settings.TEMPLATE_DIRS = [TEMPLATE_DIR]
settings.TEMPLATES = [{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
@@ -161,13 +161,13 @@ def setup(verbosity, test_labels):
warnings.filterwarnings(
'ignore',
- 'django.contrib.webdesign will be removed in Django 2.0.',
- RemovedInDjango20Warning
+ 'django.contrib.webdesign will be removed in Django 1.10.',
+ RemovedInDjango110Warning
)
warnings.filterwarnings(
'ignore',
'The GeoManager class is deprecated.',
- RemovedInDjango21Warning
+ RemovedInDjango20Warning
)
# Load all the ALWAYS_INSTALLED_APPS.
diff --git a/tests/settings_tests/tests.py b/tests/settings_tests/tests.py
index 97fb72baa5..be1cb426d8 100644
--- a/tests/settings_tests/tests.py
+++ b/tests/settings_tests/tests.py
@@ -487,7 +487,7 @@ class TestSessionVerification(unittest.TestCase):
Settings('fake_settings_module')
self.assertEqual(
force_text(warn[0].message),
- "Session verification will become mandatory in Django 2.0. "
+ "Session verification will become mandatory in Django 1.10. "
"Please add 'django.contrib.auth.middleware.SessionAuthenticationMiddleware' "
"to your MIDDLEWARE_CLASSES setting when you are ready to opt-in after "
"reading the upgrade considerations in the 1.8 release notes.",
diff --git a/tests/shortcuts/tests.py b/tests/shortcuts/tests.py
index 74acb13d7e..ef7a0edc7a 100644
--- a/tests/shortcuts/tests.py
+++ b/tests/shortcuts/tests.py
@@ -1,6 +1,6 @@
from django.test import SimpleTestCase, ignore_warnings, override_settings
from django.test.utils import require_jinja2
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
@override_settings(
@@ -19,7 +19,7 @@ class ShortcutTests(SimpleTestCase):
self.assertEqual(response.status_code, 200)
self.assertEqual(response.content, b'FOO.BAR..\n')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_render_to_response_with_request_context(self):
response = self.client.get('/render_to_response/request_context/')
self.assertEqual(response.status_code, 200)
@@ -32,7 +32,7 @@ class ShortcutTests(SimpleTestCase):
self.assertEqual(response.content, b'FOO.BAR..\n')
self.assertEqual(response['Content-Type'], 'application/x-rendertest')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_render_to_response_with_dirs(self):
response = self.client.get('/render_to_response/dirs/')
self.assertEqual(response.status_code, 200)
@@ -53,7 +53,7 @@ class ShortcutTests(SimpleTestCase):
response = self.client.get('/render_to_response/using/?using=jinja2')
self.assertEqual(response.content, b'Jinja2\n')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_render_to_response_with_context_instance_misuse(self):
"""
For backwards-compatibility, ensure that it's possible to pass a
@@ -75,7 +75,7 @@ class ShortcutTests(SimpleTestCase):
self.assertEqual(response.status_code, 200)
self.assertEqual(response.content, b'FOO.BAR../render/multiple_templates/\n')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_render_with_base_context(self):
response = self.client.get('/render/base_context/')
self.assertEqual(response.status_code, 200)
@@ -102,19 +102,19 @@ class ShortcutTests(SimpleTestCase):
response = self.client.get('/render/using/?using=jinja2')
self.assertEqual(response.content, b'Jinja2\n')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_render_with_current_app(self):
response = self.client.get('/render/current_app/')
self.assertEqual(response.context.request.current_app, "foobar_app")
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_render_with_dirs(self):
response = self.client.get('/render/dirs/')
self.assertEqual(response.status_code, 200)
self.assertEqual(response.content, b'spam eggs\n')
self.assertEqual(response['Content-Type'], 'text/html; charset=utf-8')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_render_with_current_app_conflict(self):
with self.assertRaises(ValueError):
self.client.get('/render/current_app_conflict/')
diff --git a/tests/sitemaps_tests/test_http.py b/tests/sitemaps_tests/test_http.py
index 2817f844d6..a6bc46e03a 100644
--- a/tests/sitemaps_tests/test_http.py
+++ b/tests/sitemaps_tests/test_http.py
@@ -11,7 +11,7 @@ from django.contrib.sites.models import Site
from django.core.exceptions import ImproperlyConfigured
from django.test import ignore_warnings, modify_settings, override_settings
from django.utils._os import upath
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.formats import localize
from django.utils.translation import activate, deactivate
@@ -21,7 +21,7 @@ from .models import TestModel
class HTTPSitemapTests(SitemapTestsBase):
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_simple_sitemap_index(self):
"A simple sitemap index can be rendered"
# The URL for views.sitemap in tests/urls/http.py has been updated
@@ -38,7 +38,7 @@ class HTTPSitemapTests(SitemapTestsBase):
""" % self.base_url
self.assertXMLEqual(response.content.decode('utf-8'), expected_content)
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@override_settings(TEMPLATES=[{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(os.path.dirname(upath(__file__)), 'templates')],
@@ -194,7 +194,7 @@ class HTTPSitemapTests(SitemapTestsBase):
""" % self.base_url
self.assertXMLEqual(response.content.decode('utf-8'), expected_content)
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_x_robots_sitemap(self):
# The URL for views.sitemap in tests/urls/http.py has been updated
# with a name but since reversing by Python path is tried first
diff --git a/tests/sitemaps_tests/test_https.py b/tests/sitemaps_tests/test_https.py
index f7b363dfe2..b3bcdc172b 100644
--- a/tests/sitemaps_tests/test_https.py
+++ b/tests/sitemaps_tests/test_https.py
@@ -3,7 +3,7 @@ from __future__ import unicode_literals
from datetime import date
from django.test import ignore_warnings, override_settings
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from .base import SitemapTestsBase
@@ -12,7 +12,7 @@ from .base import SitemapTestsBase
class HTTPSSitemapTests(SitemapTestsBase):
protocol = 'https'
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_secure_sitemap_index(self):
"A secure sitemap index can be rendered"
# The URL for views.sitemap in tests/urls/https.py has been updated
@@ -44,7 +44,7 @@ class HTTPSSitemapTests(SitemapTestsBase):
class HTTPSDetectionSitemapTests(SitemapTestsBase):
extra = {'wsgi.url_scheme': 'https'}
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_sitemap_index_with_https_request(self):
"A sitemap index requested in HTTPS is rendered with HTTPS links"
# The URL for views.sitemap in tests/urls/https.py has been updated
diff --git a/tests/template_backends/test_django.py b/tests/template_backends/test_django.py
index 2a21b04b5a..332eeaee25 100644
--- a/tests/template_backends/test_django.py
+++ b/tests/template_backends/test_django.py
@@ -4,7 +4,7 @@ from django.template import RequestContext
from django.template.backends.django import DjangoTemplates
from django.template.library import InvalidTemplateLibrary
from django.test import RequestFactory, ignore_warnings, override_settings
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from .test_dummy import TemplateStringsTests
@@ -36,7 +36,7 @@ class DjangoTemplatesTests(TemplateStringsTests):
content = template.render({'processors': 'no'}, request)
self.assertEqual(content, 'no')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_request_context_conflicts_with_request(self):
template = self.engine.from_string('hello')
diff --git a/tests/template_tests/filter_tests/test_removetags.py b/tests/template_tests/filter_tests/test_removetags.py
index 4b3dd161e7..9cc6c5a4f9 100644
--- a/tests/template_tests/filter_tests/test_removetags.py
+++ b/tests/template_tests/filter_tests/test_removetags.py
@@ -1,12 +1,12 @@
from django.template.defaultfilters import removetags
from django.test import SimpleTestCase, ignore_warnings
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.safestring import mark_safe
from ..utils import setup
-@ignore_warnings(category=RemovedInDjango20Warning)
+@ignore_warnings(category=RemovedInDjango110Warning)
class RemovetagsTests(SimpleTestCase):
@setup({'removetags01': '{{ a|removetags:"a b" }} {{ b|removetags:"a b" }}'})
@@ -33,7 +33,7 @@ class RemovetagsTests(SimpleTestCase):
self.assertEqual(output, 'x <p>y</p> x <p>y</p>')
-@ignore_warnings(category=RemovedInDjango20Warning)
+@ignore_warnings(category=RemovedInDjango110Warning)
class FunctionTests(SimpleTestCase):
def test_removetags(self):
diff --git a/tests/template_tests/filter_tests/test_unordered_list.py b/tests/template_tests/filter_tests/test_unordered_list.py
index 815d488347..77e5bab0c6 100644
--- a/tests/template_tests/filter_tests/test_unordered_list.py
+++ b/tests/template_tests/filter_tests/test_unordered_list.py
@@ -1,6 +1,6 @@
from django.template.defaultfilters import unordered_list
from django.test import SimpleTestCase, ignore_warnings
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import python_2_unicode_compatible
from django.utils.safestring import mark_safe
@@ -14,7 +14,7 @@ class UnorderedListTests(SimpleTestCase):
output = self.engine.render_to_string('unordered_list01', {'a': ['x>', ['<y']]})
self.assertEqual(output, '\t<li>x&gt;\n\t<ul>\n\t\t<li>&lt;y</li>\n\t</ul>\n\t</li>')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'unordered_list02': '{% autoescape off %}{{ a|unordered_list }}{% endautoescape %}'})
def test_unordered_list02(self):
output = self.engine.render_to_string('unordered_list02', {'a': ['x>', ['<y']]})
@@ -36,7 +36,7 @@ class UnorderedListTests(SimpleTestCase):
self.assertEqual(output, '\t<li>x>\n\t<ul>\n\t\t<li><y</li>\n\t</ul>\n\t</li>')
-@ignore_warnings(category=RemovedInDjango20Warning)
+@ignore_warnings(category=RemovedInDjango110Warning)
class DeprecatedUnorderedListSyntaxTests(SimpleTestCase):
@setup({'unordered_list01': '{{ a|unordered_list }}'})
@@ -165,7 +165,7 @@ class FunctionTests(SimpleTestCase):
'\t<li>ulitem-a</li>\n\t<li>ulitem-b</li>\n\t<li>ulitem-<a>c</a></li>',
)
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_legacy(self):
"""
Old format for unordered lists should still work
diff --git a/tests/template_tests/syntax_tests/test_cycle.py b/tests/template_tests/syntax_tests/test_cycle.py
index c478faff52..7e9f7c3c8d 100644
--- a/tests/template_tests/syntax_tests/test_cycle.py
+++ b/tests/template_tests/syntax_tests/test_cycle.py
@@ -1,6 +1,6 @@
from django.template import TemplateSyntaxError
from django.test import SimpleTestCase, ignore_warnings
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from ..utils import setup
@@ -13,19 +13,19 @@ class CycleTagTests(SimpleTestCase):
with self.assertRaises(TemplateSyntaxError):
self.engine.get_template('cycle01')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'cycle02': '{% cycle a,b,c as abc %}{% cycle abc %}'})
def test_cycle02(self):
output = self.engine.render_to_string('cycle02')
self.assertEqual(output, 'ab')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'cycle03': '{% cycle a,b,c as abc %}{% cycle abc %}{% cycle abc %}'})
def test_cycle03(self):
output = self.engine.render_to_string('cycle03')
self.assertEqual(output, 'abc')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'cycle04': '{% cycle a,b,c as abc %}{% cycle abc %}{% cycle abc %}{% cycle abc %}'})
def test_cycle04(self):
output = self.engine.render_to_string('cycle04')
@@ -41,19 +41,19 @@ class CycleTagTests(SimpleTestCase):
with self.assertRaises(TemplateSyntaxError):
self.engine.get_template('cycle06')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'cycle07': '{% cycle a,b,c as foo %}{% cycle bar %}'})
def test_cycle07(self):
with self.assertRaises(TemplateSyntaxError):
self.engine.get_template('cycle07')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'cycle08': '{% cycle a,b,c as foo %}{% cycle foo %}{{ foo }}{{ foo }}{% cycle foo %}{{ foo }}'})
def test_cycle08(self):
output = self.engine.render_to_string('cycle08')
self.assertEqual(output, 'abbbcc')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'cycle09': '{% for i in test %}{% cycle a,b %}{{ i }},{% endfor %}'})
def test_cycle09(self):
output = self.engine.render_to_string('cycle09', {'test': list(range(5))})
@@ -146,20 +146,20 @@ class CycleTagTests(SimpleTestCase):
output = self.engine.render_to_string('cycle25', {'a': '<'})
self.assertEqual(output, '&lt;')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'cycle26': '{% load cycle from future %}{% cycle a b as ab %}{% cycle ab %}'})
def test_cycle26(self):
output = self.engine.render_to_string('cycle26', {'a': '<', 'b': '>'})
self.assertEqual(output, '&lt;&gt;')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'cycle27': '{% load cycle from future %}'
'{% autoescape off %}{% cycle a b as ab %}{% cycle ab %}{% endautoescape %}'})
def test_cycle27(self):
output = self.engine.render_to_string('cycle27', {'a': '<', 'b': '>'})
self.assertEqual(output, '<>')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'cycle28': '{% load cycle from future %}{% cycle a|safe b as ab %}{% cycle ab %}'})
def test_cycle28(self):
output = self.engine.render_to_string('cycle28', {'a': '<', 'b': '>'})
diff --git a/tests/template_tests/syntax_tests/test_firstof.py b/tests/template_tests/syntax_tests/test_firstof.py
index 79eb381c69..c25a1854c3 100644
--- a/tests/template_tests/syntax_tests/test_firstof.py
+++ b/tests/template_tests/syntax_tests/test_firstof.py
@@ -1,6 +1,6 @@
from django.template import TemplateSyntaxError
from django.test import SimpleTestCase, ignore_warnings
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from ..utils import setup
@@ -58,26 +58,26 @@ class FirstOfTagTests(SimpleTestCase):
output = self.engine.render_to_string('firstof10', {'a': '<'})
self.assertEqual(output, '&lt;')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'firstof11': '{% load firstof from future %}{% firstof a b %}'})
def test_firstof11(self):
output = self.engine.render_to_string('firstof11', {'a': '<', 'b': '>'})
self.assertEqual(output, '&lt;')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'firstof12': '{% load firstof from future %}{% firstof a b %}'})
def test_firstof12(self):
output = self.engine.render_to_string('firstof12', {'a': '', 'b': '>'})
self.assertEqual(output, '&gt;')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'firstof13': '{% load firstof from future %}'
'{% autoescape off %}{% firstof a %}{% endautoescape %}'})
def test_firstof13(self):
output = self.engine.render_to_string('firstof13', {'a': '<'})
self.assertEqual(output, '<')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'firstof14': '{% load firstof from future %}{% firstof a|safe b %}'})
def test_firstof14(self):
output = self.engine.render_to_string('firstof14', {'a': '<'})
diff --git a/tests/template_tests/syntax_tests/test_for.py b/tests/template_tests/syntax_tests/test_for.py
index 8045ea4990..32fc5f0e3e 100644
--- a/tests/template_tests/syntax_tests/test_for.py
+++ b/tests/template_tests/syntax_tests/test_for.py
@@ -1,6 +1,6 @@
from django.template import TemplateSyntaxError
from django.test import SimpleTestCase, ignore_warnings
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from ..utils import setup
@@ -126,9 +126,9 @@ class ForTagTests(SimpleTestCase):
self.assertEqual(output, 'abc')
# These tests raise deprecation warnings and will raise an exception
- # in Django 2.0. The existing behavior is silent truncation if the
+ # in Django 1.10. The existing behavior is silent truncation if the
# length of loopvars differs to the length of each set of items.
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'for-tag-unpack10': '{% for x,y in items %}{{ x }}:{{ y }}/{% endfor %}'})
def test_for_tag_unpack10(self):
output = self.engine.render_to_string(
@@ -137,7 +137,7 @@ class ForTagTests(SimpleTestCase):
)
self.assertEqual(output, 'one:1/two:2/')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'for-tag-unpack11': '{% for x,y,z in items %}{{ x }}:{{ y }},{{ z }}/{% endfor %}'})
def test_for_tag_unpack11(self):
output = self.engine.render_to_string(
@@ -150,7 +150,7 @@ class ForTagTests(SimpleTestCase):
else:
self.assertEqual(output, 'one:1,/two:2,/')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'for-tag-unpack12': '{% for x,y,z in items %}{{ x }}:{{ y }},{{ z }}/{% endfor %}'})
def test_for_tag_unpack12(self):
output = self.engine.render_to_string(
@@ -162,7 +162,7 @@ class ForTagTests(SimpleTestCase):
else:
self.assertEqual(output, 'one:1,carrot/two:2,/')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'for-tag-unpack14': '{% for x,y in items %}{{ x }}:{{ y }}/{% endfor %}'})
def test_for_tag_unpack14(self):
output = self.engine.render_to_string('for-tag-unpack14', {'items': (1, 2)})
diff --git a/tests/template_tests/syntax_tests/test_if.py b/tests/template_tests/syntax_tests/test_if.py
index 290a092a04..6bbf2598a1 100644
--- a/tests/template_tests/syntax_tests/test_if.py
+++ b/tests/template_tests/syntax_tests/test_if.py
@@ -3,7 +3,7 @@ import warnings
from django.template import TemplateSyntaxError
from django.test import SimpleTestCase, ignore_warnings
from django.test.utils import reset_warning_registry
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from ..utils import TestObj, setup
@@ -537,15 +537,15 @@ class IfTagTests(SimpleTestCase):
self.assertEqual(len(warns), 1)
self.assertEqual(
str(warns[0].message),
- "Operator '=' is deprecated and will be removed in Django 2.0. "
+ "Operator '=' is deprecated and will be removed in Django 1.10. "
"Use '==' instead."
)
-@ignore_warnings(category=RemovedInDjango20Warning)
+@ignore_warnings(category=RemovedInDjango110Warning)
class TestEqualitySingleEqualsSign(SimpleTestCase):
# The following tests should be changed to template.TemplateSyntaxError
- # (or simply removed) when the deprecation path ends in Django 2.0.
+ # (or simply removed) when the deprecation path ends in Django 1.10.
@setup({'if-tag-eq01': '{% if foo = bar %}yes{% else %}no{% endif %}'})
def test_if_tag_eq01(self):
output = self.engine.render_to_string('if-tag-eq01', {'foo': 1})
diff --git a/tests/template_tests/syntax_tests/test_ssi.py b/tests/template_tests/syntax_tests/test_ssi.py
index e1422de509..0fd9af7712 100644
--- a/tests/template_tests/syntax_tests/test_ssi.py
+++ b/tests/template_tests/syntax_tests/test_ssi.py
@@ -4,12 +4,12 @@ import os
from django.template import Context, Engine
from django.test import SimpleTestCase, ignore_warnings
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from ..utils import ROOT, setup
-@ignore_warnings(category=RemovedInDjango20Warning)
+@ignore_warnings(category=RemovedInDjango110Warning)
class SsiTagTests(SimpleTestCase):
# Test normal behavior
@@ -81,7 +81,7 @@ class SsiTagTests(SimpleTestCase):
'with spaces in its name. Look ma! It parsed!\n')
-@ignore_warnings(category=RemovedInDjango20Warning)
+@ignore_warnings(category=RemovedInDjango110Warning)
class SSISecurityTests(SimpleTestCase):
def setUp(self):
diff --git a/tests/template_tests/syntax_tests/test_url.py b/tests/template_tests/syntax_tests/test_url.py
index 8da4dba67b..d593591480 100644
--- a/tests/template_tests/syntax_tests/test_url.py
+++ b/tests/template_tests/syntax_tests/test_url.py
@@ -2,7 +2,7 @@
from django.core.urlresolvers import NoReverseMatch
from django.template import TemplateSyntaxError
from django.test import SimpleTestCase, ignore_warnings, override_settings
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from ..utils import setup
@@ -11,37 +11,37 @@ from ..utils import setup
class UrlTagTests(SimpleTestCase):
# Successes
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'url01': '{% url "template_tests.views.client" client.id %}'})
def test_url01(self):
output = self.engine.render_to_string('url01', {'client': {'id': 1}})
self.assertEqual(output, '/client/1/')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'url02': '{% url "template_tests.views.client_action" id=client.id action="update" %}'})
def test_url02(self):
output = self.engine.render_to_string('url02', {'client': {'id': 1}})
self.assertEqual(output, '/client/1/update/')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'url02a': '{% url "template_tests.views.client_action" client.id "update" %}'})
def test_url02a(self):
output = self.engine.render_to_string('url02a', {'client': {'id': 1}})
self.assertEqual(output, '/client/1/update/')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'url02b': "{% url 'template_tests.views.client_action' id=client.id action='update' %}"})
def test_url02b(self):
output = self.engine.render_to_string('url02b', {'client': {'id': 1}})
self.assertEqual(output, '/client/1/update/')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'url02c': "{% url 'template_tests.views.client_action' client.id 'update' %}"})
def test_url02c(self):
output = self.engine.render_to_string('url02c', {'client': {'id': 1}})
self.assertEqual(output, '/client/1/update/')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'url03': '{% url "template_tests.views.index" %}'})
def test_url03(self):
output = self.engine.render_to_string('url03')
@@ -62,7 +62,7 @@ class UrlTagTests(SimpleTestCase):
output = self.engine.render_to_string('url06', {'v': 'Ω'})
self.assertEqual(output, '/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4/%CE%A9/')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'url07': '{% url "template_tests.views.client2" tag=v %}'})
def test_url07(self):
output = self.engine.render_to_string('url07', {'v': 'Ω'})
@@ -78,13 +78,13 @@ class UrlTagTests(SimpleTestCase):
output = self.engine.render_to_string('url09', {'v': 'Ω'})
self.assertEqual(output, '/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4/%CE%A9/')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'url10': '{% url "template_tests.views.client_action" id=client.id action="two words" %}'})
def test_url10(self):
output = self.engine.render_to_string('url10', {'client': {'id': 1}})
self.assertEqual(output, '/client/1/two%20words/')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'url11': '{% url "template_tests.views.client_action" id=client.id action="==" %}'})
def test_url11(self):
output = self.engine.render_to_string('url11', {'client': {'id': 1}})
@@ -92,37 +92,37 @@ class UrlTagTests(SimpleTestCase):
@setup({'url12': '{% url "template_tests.views.client_action" '
'id=client.id action="!$&\'()*+,;=~:@," %}'})
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_url12(self):
output = self.engine.render_to_string('url12', {'client': {'id': 1}})
self.assertEqual(output, '/client/1/!$&\'()*+,;=~:@,/')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'url13': '{% url "template_tests.views.client_action" '
'id=client.id action=arg|join:"-" %}'})
def test_url13(self):
output = self.engine.render_to_string('url13', {'client': {'id': 1}, 'arg': ['a', 'b']})
self.assertEqual(output, '/client/1/a-b/')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'url14': '{% url "template_tests.views.client_action" client.id arg|join:"-" %}'})
def test_url14(self):
output = self.engine.render_to_string('url14', {'client': {'id': 1}, 'arg': ['a', 'b']})
self.assertEqual(output, '/client/1/a-b/')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'url15': '{% url "template_tests.views.client_action" 12 "test" %}'})
def test_url15(self):
output = self.engine.render_to_string('url15')
self.assertEqual(output, '/client/12/test/')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'url18': '{% url "template_tests.views.client" "1,2" %}'})
def test_url18(self):
output = self.engine.render_to_string('url18')
self.assertEqual(output, '/client/1,2/')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'url19': '{% url named_url client.id %}'})
def test_url19(self):
output = self.engine.render_to_string('url19', {'client': {'id': 1}, 'named_url': 'template_tests.views.client'})
@@ -144,7 +144,7 @@ class UrlTagTests(SimpleTestCase):
with self.assertRaises(NoReverseMatch):
self.engine.render_to_string('url-fail02')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'url-fail03': '{% url "template_tests.views.client" %}'})
def test_url_fail03(self):
with self.assertRaises(NoReverseMatch):
@@ -190,7 +190,7 @@ class UrlTagTests(SimpleTestCase):
with self.assertRaises(NoReverseMatch):
self.engine.render_to_string('url-fail12', {'named_url': 'no_such_view'})
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'url-fail13': '{% url named_url %}'})
def test_url_fail13(self):
with self.assertRaises(NoReverseMatch):
@@ -227,13 +227,13 @@ class UrlTagTests(SimpleTestCase):
self.engine.render_to_string('url-fail19', {'named_url': 'view'})
# {% url ... as var %}
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'url-asvar01': '{% url "template_tests.views.index" as url %}'})
def test_url_asvar01(self):
output = self.engine.render_to_string('url-asvar01')
self.assertEqual(output, '')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
@setup({'url-asvar02': '{% url "template_tests.views.index" as url %}{{ url }}'})
def test_url_asvar02(self):
output = self.engine.render_to_string('url-asvar02')
diff --git a/tests/template_tests/test_custom.py b/tests/template_tests/test_custom.py
index 11c04f870c..5d2907074d 100644
--- a/tests/template_tests/test_custom.py
+++ b/tests/template_tests/test_custom.py
@@ -8,7 +8,7 @@ from django.template.library import InvalidTemplateLibrary
from django.test import SimpleTestCase, ignore_warnings
from django.test.utils import extend_sys_path
from django.utils import six
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from .templatetags import custom, inclusion
from .utils import ROOT
@@ -247,7 +247,7 @@ class InclusionTagTests(TagTestCase):
self.verify_tag(inclusion.inclusion_tag_current_app, 'inclusion_tag_current_app')
self.verify_tag(inclusion.inclusion_unlimited_args_kwargs, 'inclusion_unlimited_args_kwargs')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_15070_current_app(self):
"""
Test that inclusion tag passes down `current_app` of context to the
diff --git a/tests/template_tests/test_engine.py b/tests/template_tests/test_engine.py
index a72a430e3e..2d354bae0b 100644
--- a/tests/template_tests/test_engine.py
+++ b/tests/template_tests/test_engine.py
@@ -3,14 +3,14 @@ import os
from django.template import Context
from django.template.engine import Engine
from django.test import SimpleTestCase, ignore_warnings
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from .utils import ROOT, TEMPLATE_DIR
OTHER_DIR = os.path.join(ROOT, 'other_templates')
-@ignore_warnings(category=RemovedInDjango20Warning)
+@ignore_warnings(category=RemovedInDjango110Warning)
class DeprecatedRenderToStringTest(SimpleTestCase):
def setUp(self):
@@ -91,7 +91,7 @@ class LoaderTests(SimpleTestCase):
self.assertEqual(template.render(Context()), 'priority\n')
-@ignore_warnings(category=RemovedInDjango20Warning)
+@ignore_warnings(category=RemovedInDjango110Warning)
class TemplateDirsOverrideTests(SimpleTestCase):
DIRS = ((OTHER_DIR, ), [OTHER_DIR])
diff --git a/tests/template_tests/test_extends.py b/tests/template_tests/test_extends.py
index 9e56d69db4..03a674e25b 100644
--- a/tests/template_tests/test_extends.py
+++ b/tests/template_tests/test_extends.py
@@ -4,7 +4,7 @@ from django.template import Context, Engine, TemplateDoesNotExist
from django.template.loader_tags import ExtendsError
from django.template.loaders.base import Loader
from django.test import SimpleTestCase, ignore_warnings
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
from .utils import ROOT
@@ -132,7 +132,7 @@ class NonRecursiveLoader(Loader):
raise TemplateDoesNotExist(template_name)
-@ignore_warnings(category=RemovedInDjango21Warning)
+@ignore_warnings(category=RemovedInDjango20Warning)
class NonRecursiveLoaderExtendsTests(SimpleTestCase):
loaders = [
diff --git a/tests/template_tests/test_loaders.py b/tests/template_tests/test_loaders.py
index 41cac5cb9d..f1263105c6 100644
--- a/tests/template_tests/test_loaders.py
+++ b/tests/template_tests/test_loaders.py
@@ -12,7 +12,7 @@ from django.template import Context, TemplateDoesNotExist
from django.template.engine import Engine
from django.test import SimpleTestCase, ignore_warnings, override_settings
from django.utils import six
-from django.utils.deprecation import RemovedInDjango21Warning
+from django.utils.deprecation import RemovedInDjango20Warning
from .utils import TEMPLATE_DIR
@@ -55,7 +55,7 @@ class CachedLoaderTests(SimpleTestCase):
e = self.engine.template_loaders[0].get_template_cache['doesnotexist.html']
self.assertEqual(e.args[0], 'doesnotexist.html')
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_load_template(self):
loader = self.engine.template_loaders[0]
template, origin = loader.load_template('index.html')
@@ -69,7 +69,7 @@ class CachedLoaderTests(SimpleTestCase):
source, name = loader.load_template('index.html')
self.assertEqual(template.origin.template_name, 'index.html')
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_load_template_missing(self):
"""
#19949 -- TemplateDoesNotExist exceptions should be cached.
@@ -176,7 +176,7 @@ class EggLoaderTests(SimpleTestCase):
output = template.render(Context({}))
self.assertEqual(output, "y")
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_load_template_source(self):
loader = self.engine.template_loaders[0]
templates = {
@@ -249,7 +249,7 @@ class FileSystemLoaderTests(SimpleTestCase):
self.assertEqual(template.origin.loader, self.engine.template_loaders[0])
self.assertEqual(template.origin.loader_name, 'django.template.loaders.filesystem.Loader')
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_load_template_source(self):
loader = self.engine.template_loaders[0]
source, name = loader.load_template_source('index.html')
@@ -336,7 +336,7 @@ class AppDirectoriesLoaderTests(SimpleTestCase):
self.assertEqual(template.origin.template_name, 'index.html')
self.assertEqual(template.origin.loader, self.engine.template_loaders[0])
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
@override_settings(INSTALLED_APPS=['template_tests'])
def test_load_template_source(self):
loader = self.engine.template_loaders[0]
@@ -367,7 +367,7 @@ class LocmemLoaderTests(SimpleTestCase):
self.assertEqual(template.origin.template_name, 'index.html')
self.assertEqual(template.origin.loader, self.engine.template_loaders[0])
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_load_template_source(self):
loader = self.engine.template_loaders[0]
source, name = loader.load_template_source('index.html')
diff --git a/tests/template_tests/test_response.py b/tests/template_tests/test_response.py
index ad71a48d6b..36a0ba704d 100644
--- a/tests/template_tests/test_response.py
+++ b/tests/template_tests/test_response.py
@@ -13,7 +13,7 @@ from django.test import (
RequestFactory, SimpleTestCase, ignore_warnings, override_settings,
)
from django.test.utils import require_jinja2
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from .utils import TEMPLATE_DIR
@@ -118,7 +118,7 @@ class SimpleTemplateResponseTest(SimpleTestCase):
response.render()
self.assertEqual(response.content, b'bar')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_context_instance(self):
response = self._response('{{ foo }}{{ processors }}',
Context({'foo': 'bar'}))
@@ -248,7 +248,7 @@ class TemplateResponseTest(SimpleTestCase):
{'foo': 'bar'}).render()
self.assertEqual(response.content, b'baryes')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_render_with_context(self):
response = self._response('{{ foo }}{{ processors }}',
Context({'foo': 'bar'})).render()
@@ -282,7 +282,7 @@ class TemplateResponseTest(SimpleTestCase):
response = TemplateResponse(request, 'template_tests/using.html', using='jinja2').render()
self.assertEqual(response.content, b'Jinja2\n')
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_custom_app(self):
self._response('{{ foo }}', current_app="foobar")
self.assertEqual(self._request.current_app, 'foobar')
diff --git a/tests/test_client_regress/tests.py b/tests/test_client_regress/tests.py
index efc44289cd..a492fd6e76 100644
--- a/tests/test_client_regress/tests.py
+++ b/tests/test_client_regress/tests.py
@@ -21,7 +21,7 @@ from django.test.client import RedirectCycleError, RequestFactory, encode_file
from django.test.utils import ContextList, str_prefix
from django.utils._os import upath
from django.utils.deprecation import (
- RemovedInDjango20Warning, RemovedInDjango21Warning,
+ RemovedInDjango20Warning, RemovedInDjango110Warning,
)
from django.utils.translation import ugettext_lazy
@@ -520,11 +520,11 @@ class AssertRedirectsTests(SimpleTestCase):
with self.assertRaises(AssertionError):
self.assertRedirects(response, 'http://testserver/secure_view/', status_code=302)
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_full_path_in_expected_urls(self):
"""
Test that specifying a full URL as assertRedirects expected_url still
- work as backwards compatible behavior until Django 2.1.
+ work as backwards compatible behavior until Django 2.0.
"""
response = self.client.get('/redirect_view/')
self.assertRedirects(response, 'http://testserver/get_view/')
@@ -1024,7 +1024,7 @@ class ContextTests(TestDataMixin, TestCase):
'python', 'dolly'},
l.keys())
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_15368(self):
# Need to insert a context processor that assumes certain things about
# the request instance. This triggers a bug caused by some ways of
diff --git a/tests/test_runner/tests.py b/tests/test_runner/tests.py
index fba8e44e02..3e47ee00f7 100644
--- a/tests/test_runner/tests.py
+++ b/tests/test_runner/tests.py
@@ -352,8 +352,8 @@ class DeprecationDisplayTest(AdminScriptTestCase):
args = ['test', '--settings=test_project.settings', 'test_runner_deprecation_app']
out, err = self.run_django_admin(args)
self.assertIn("Ran 1 test", force_text(err))
- six.assertRegex(self, err, r"RemovedInDjango\d\dWarning: warning from test")
- six.assertRegex(self, err, r"RemovedInDjango\d\dWarning: module-level warning from deprecation_app")
+ six.assertRegex(self, err, r"RemovedInDjango\d+Warning: warning from test")
+ six.assertRegex(self, err, r"RemovedInDjango\d+Warning: module-level warning from deprecation_app")
def test_runner_deprecation_verbosity_zero(self):
args = ['test', '--settings=test_project.settings', '--verbosity=0', 'test_runner_deprecation_app']
diff --git a/tests/urlpatterns_reverse/erroneous_urls.py b/tests/urlpatterns_reverse/erroneous_urls.py
index c96424f830..281d2bfa5b 100644
--- a/tests/urlpatterns_reverse/erroneous_urls.py
+++ b/tests/urlpatterns_reverse/erroneous_urls.py
@@ -1,15 +1,15 @@
import warnings
from django.conf.urls import url
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from . import views
# Test deprecated behavior of passing strings as view to url().
-# Some of these can be removed in Django 2.0 as they aren't convertable to
+# Some of these can be removed in Django 1.10 as they aren't convertable to
# callables.
with warnings.catch_warnings():
- warnings.filterwarnings('ignore', category=RemovedInDjango20Warning)
+ warnings.filterwarnings('ignore', category=RemovedInDjango110Warning)
urlpatterns = [
# View has erroneous import
url(r'erroneous_inner/$', views.erroneous_view),
diff --git a/tests/urlpatterns_reverse/included_namespace_urls.py b/tests/urlpatterns_reverse/included_namespace_urls.py
index 43bba1b6de..93aa007716 100644
--- a/tests/urlpatterns_reverse/included_namespace_urls.py
+++ b/tests/urlpatterns_reverse/included_namespace_urls.py
@@ -1,7 +1,7 @@
import warnings
from django.conf.urls import include, patterns, url
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from .namespace_urls import URLObject
from .views import view_class_instance
@@ -9,9 +9,9 @@ from .views import view_class_instance
testobj3 = URLObject('testapp', 'test-ns3')
testobj4 = URLObject('testapp', 'test-ns4')
-# test deprecated patterns() function. convert to list of urls() in Django 2.0
+# test deprecated patterns() function. convert to list of urls() in Django 1.10
with warnings.catch_warnings():
- warnings.filterwarnings('ignore', category=RemovedInDjango20Warning)
+ warnings.filterwarnings('ignore', category=RemovedInDjango110Warning)
urlpatterns = patterns('urlpatterns_reverse.views',
url(r'^normal/$', 'empty_view', name='inc-normal-view'),
diff --git a/tests/urlpatterns_reverse/tests.py b/tests/urlpatterns_reverse/tests.py
index 7363084f2a..66803cd762 100644
--- a/tests/urlpatterns_reverse/tests.py
+++ b/tests/urlpatterns_reverse/tests.py
@@ -27,7 +27,7 @@ from django.test import (
from django.test.utils import override_script_prefix
from django.utils import six
from django.utils.deprecation import (
- RemovedInDjango20Warning, RemovedInDjango21Warning,
+ RemovedInDjango20Warning, RemovedInDjango110Warning,
)
from . import middleware, urlconf_outer, views
@@ -227,7 +227,7 @@ class NoURLPatternsTests(SimpleTestCase):
@override_settings(ROOT_URLCONF='urlpatterns_reverse.urls')
class URLPatternReverse(SimpleTestCase):
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_urlpattern_reverse(self):
for name, expected, args, kwargs in test_data:
try:
@@ -303,7 +303,7 @@ class URLPatternReverse(SimpleTestCase):
class ResolverTests(unittest.TestCase):
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_resolver_repr(self):
"""
Test repr of RegexURLResolver, especially when urlconf_name is a list
@@ -469,7 +469,7 @@ class ReverseShortcutTests(SimpleTestCase):
redirect("urlpatterns_reverse.nonimported_module.view")
self.assertNotIn("urlpatterns_reverse.nonimported_module", sys.modules)
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_reverse_by_path_nested(self):
# Views that are added to urlpatterns using include() should be
# reversible by dotted path.
@@ -483,7 +483,7 @@ class ReverseShortcutTests(SimpleTestCase):
@override_settings(ROOT_URLCONF='urlpatterns_reverse.namespace_urls')
-@ignore_warnings(category=RemovedInDjango21Warning)
+@ignore_warnings(category=RemovedInDjango20Warning)
class NamespaceTests(SimpleTestCase):
def test_ambiguous_object(self):
@@ -824,7 +824,7 @@ class NoRootUrlConfTests(SimpleTestCase):
@override_settings(ROOT_URLCONF='urlpatterns_reverse.namespace_urls')
class ResolverMatchTests(SimpleTestCase):
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_urlpattern_resolve(self):
for path, url_name, app_name, namespace, view_name, func, args, kwargs in resolve_test_data:
# Test legacy support for extracting "function, args, kwargs"
@@ -849,7 +849,7 @@ class ResolverMatchTests(SimpleTestCase):
self.assertEqual(match[1], args)
self.assertEqual(match[2], kwargs)
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_resolver_match_on_request(self):
response = self.client.get('/resolver_match/')
resolver_match = response.resolver_match
@@ -917,12 +917,12 @@ class IncludeTests(SimpleTestCase):
def test_include_urls(self):
self.assertEqual(include(self.url_patterns), (self.url_patterns, None, None))
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_include_namespace(self):
# no app_name -> deprecated
self.assertEqual(include(self.url_patterns, 'namespace'), (self.url_patterns, None, 'namespace'))
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_include_namespace_app_name(self):
# app_name argument to include -> deprecated
self.assertEqual(
@@ -930,7 +930,7 @@ class IncludeTests(SimpleTestCase):
(self.url_patterns, 'app_name', 'namespace')
)
- @ignore_warnings(category=RemovedInDjango21Warning)
+ @ignore_warnings(category=RemovedInDjango20Warning)
def test_include_3_tuple(self):
# 3-tuple -> deprecated
self.assertEqual(
diff --git a/tests/urlpatterns_reverse/urls.py b/tests/urlpatterns_reverse/urls.py
index 25609c14cf..98a00f803f 100644
--- a/tests/urlpatterns_reverse/urls.py
+++ b/tests/urlpatterns_reverse/urls.py
@@ -1,7 +1,7 @@
import warnings
from django.conf.urls import include, patterns, url
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from .views import (
absolute_kwargs_view, defaults_view, empty_view, empty_view_partial,
@@ -13,9 +13,9 @@ other_patterns = [
url(r'nested_path/$', nested_view),
]
-# test deprecated patterns() function. convert to list of urls() in Django 2.0
+# test deprecated patterns() function. convert to list of urls() in Django 1.10
with warnings.catch_warnings():
- warnings.filterwarnings('ignore', category=RemovedInDjango20Warning)
+ warnings.filterwarnings('ignore', category=RemovedInDjango110Warning)
urlpatterns = patterns('',
url(r'^places/([0-9]+)/$', empty_view, name='places'),
diff --git a/tests/user_commands/tests.py b/tests/user_commands/tests.py
index eb3b86bd38..a50e714c94 100644
--- a/tests/user_commands/tests.py
+++ b/tests/user_commands/tests.py
@@ -9,7 +9,7 @@ from django.test import SimpleTestCase, ignore_warnings, override_settings
from django.test.utils import captured_stderr, captured_stdout, extend_sys_path
from django.utils import translation
from django.utils._os import upath
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.six import StringIO
@@ -104,7 +104,7 @@ class CommandTests(SimpleTestCase):
self.assertNotIn("opt_3", out.getvalue())
self.assertNotIn("opt-3", out.getvalue())
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_optparse_compatibility(self):
"""
optparse should be supported during Django 1.8/1.9 releases.
diff --git a/tests/utils_tests/test_checksums.py b/tests/utils_tests/test_checksums.py
index 0f6c8d6454..c3888ca26b 100644
--- a/tests/utils_tests/test_checksums.py
+++ b/tests/utils_tests/test_checksums.py
@@ -1,7 +1,7 @@
import unittest
from django.test import ignore_warnings
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
class TestUtilsChecksums(unittest.TestCase):
@@ -15,7 +15,7 @@ class TestUtilsChecksums(unittest.TestCase):
output = value
self.assertEqual(function(value), output)
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_luhn(self):
from django.utils import checksums
f = checksums.luhn
diff --git a/tests/utils_tests/test_html.py b/tests/utils_tests/test_html.py
index 58a4d48753..bc9874c696 100644
--- a/tests/utils_tests/test_html.py
+++ b/tests/utils_tests/test_html.py
@@ -7,7 +7,7 @@ from datetime import datetime
from django.test import SimpleTestCase, ignore_warnings
from django.utils import html, safestring, six
from django.utils._os import upath
-from django.utils.deprecation import RemovedInDjango20Warning
+from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import force_text
@@ -123,7 +123,7 @@ class TestUtilsHtml(SimpleTestCase):
for value, output in items:
self.check_output(f, value, output)
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_strip_entities(self):
f = html.strip_entities
# Strings that should come out untouched.
@@ -154,7 +154,7 @@ class TestUtilsHtml(SimpleTestCase):
for value, output in items:
self.check_output(f, value, output)
- @ignore_warnings(category=RemovedInDjango20Warning)
+ @ignore_warnings(category=RemovedInDjango110Warning)
def test_remove_tags(self):
f = html.remove_tags
items = (
diff --git a/tests/view_tests/tests/test_csrf.py b/tests/view_tests/tests/test_csrf.py
index ff30becc11..50104df989 100644
--- a/tests/view_tests/tests/test_csrf.py
+++ b/tests/view_tests/tests/test_csrf.py
@@ -63,7 +63,7 @@ class CsrfViewTests(SimpleTestCase):
"by third parties.",
status_code=403)
- # In Django 2.0, this can be changed to TEMPLATES=[] because the code path
+ # In Django 1.10, this can be changed to TEMPLATES=[] because the code path
# that reads the TEMPLATE_* settings in that case will have been removed.
@override_settings(TEMPLATES=[{
'BACKEND': 'django.template.backends.dummy.TemplateStrings',