Skip to content

Commit

Permalink
[1.8.x] Renamed RemovedInDjango20Warning to RemovedInDjango110Warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
timgraham committed Jun 23, 2015
1 parent 7439039 commit ae1d663
Show file tree
Hide file tree
Showing 103 changed files with 348 additions and 340 deletions.
6 changes: 3 additions & 3 deletions django/conf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

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
from django.utils import six

Expand Down Expand Up @@ -115,11 +115,11 @@ def __init__(self, settings_module):
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:
Expand Down
10 changes: 5 additions & 5 deletions django/conf/urls/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
RegexURLResolver, LocaleRegexURLResolver)
from django.core.exceptions import ImproperlyConfigured
from django.utils import six
from django.utils.deprecation import RemovedInDjango20Warning
from django.utils.deprecation import RemovedInDjango110Warning


__all__ = ['handler400', 'handler403', 'handler404', 'handler500', 'include', 'patterns', 'url']
Expand Down Expand Up @@ -49,9 +49,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:
Expand All @@ -72,9 +72,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)
Expand Down
6 changes: 3 additions & 3 deletions django/conf/urls/i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
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


Expand All @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions django/contrib/admin/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
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
Expand Down Expand Up @@ -284,9 +284,9 @@ def __init__(self, formset, form, fieldsets, prepopulated_fields, original,
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,
Expand Down
6 changes: 3 additions & 3 deletions django/contrib/auth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
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
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions django/contrib/contenttypes/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
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 _

Expand Down Expand Up @@ -41,7 +41,7 @@ def create(self, **kwargs):
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):
Expand Down
12 changes: 6 additions & 6 deletions django/contrib/gis/db/models/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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
from django.utils.deprecation import RemovedInDjango110Warning


class GeoQuerySet(QuerySet):
Expand Down Expand Up @@ -69,7 +69,7 @@ def collect(self, **kwargs):
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)

Expand Down Expand Up @@ -114,7 +114,7 @@ def extent(self, **kwargs):
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)

Expand All @@ -127,7 +127,7 @@ def extent3d(self, **kwargs):
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)

Expand Down Expand Up @@ -234,7 +234,7 @@ def make_line(self, **kwargs):
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)

Expand Down Expand Up @@ -422,7 +422,7 @@ def unionagg(self, **kwargs):
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)

Expand Down
2 changes: 1 addition & 1 deletion django/contrib/gis/db/models/sql/aggregates.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
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)
6 changes: 3 additions & 3 deletions django/contrib/webdesign/__init__.py
Original file line number Diff line number Diff line change
@@ -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
)
4 changes: 2 additions & 2 deletions django/core/context_processors.py
Original file line number Diff line number Diff line change
@@ -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)
6 changes: 3 additions & 3 deletions django/core/files/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
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.module_loading import import_string
Expand Down Expand Up @@ -56,8 +56,8 @@ def save(self, name, content, max_length=None):
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)

Expand Down
10 changes: 5 additions & 5 deletions django/core/management/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from django.core.management.color import color_style, no_style
from django.db import connections
from django.utils.deprecation import (
RemovedInDjango19Warning, RemovedInDjango20Warning,
RemovedInDjango19Warning, RemovedInDjango110Warning,
)
from django.utils.encoding import force_str

Expand Down Expand Up @@ -174,7 +174,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
Expand Down Expand Up @@ -306,7 +306,7 @@ def store_as_int(option, opt_str, value, parser):
# 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())
Expand Down Expand Up @@ -648,9 +648,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__()

Expand Down
4 changes: 2 additions & 2 deletions django/core/management/commands/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
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


Expand Down Expand Up @@ -73,7 +73,7 @@ def handle(self, *args, **options):
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',
Expand Down
4 changes: 2 additions & 2 deletions django/core/urlresolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
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 lazy
from django.utils.http import RFC3986_SUBDELIMS, urlquote
Expand Down Expand Up @@ -442,7 +442,7 @@ def _reverse_with_prefix(self, lookup_view, _prefix, *args, **kwargs):
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)

Expand Down
4 changes: 2 additions & 2 deletions django/db/backends/base/creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from django.core import serializers
from django.db import router
from django.db.backends.utils import truncate_name
from django.utils.deprecation import RemovedInDjango20Warning
from django.utils.deprecation import RemovedInDjango110Warning
from django.utils.encoding import force_bytes
from django.utils.six import StringIO
from django.utils.six.moves import input
Expand Down Expand Up @@ -191,7 +191,7 @@ def sql_indexes_for_model(self, model, style):
"""
warnings.warn("DatabaseCreation.sql_indexes_for_model is deprecated, "
"use the equivalent method of the schema editor instead.",
RemovedInDjango20Warning)
RemovedInDjango110Warning)
if not model._meta.managed or model._meta.proxy or model._meta.swapped:
return []
output = []
Expand Down
2 changes: 1 addition & 1 deletion django/db/models/aggregates.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_group_by_cols(self):
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
Expand Down
6 changes: 3 additions & 3 deletions django/db/models/fields/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
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.translation import ugettext_lazy as _

Expand Down Expand Up @@ -96,8 +96,8 @@ def save(self, name, content, save=True):
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)

Expand Down
4 changes: 2 additions & 2 deletions django/db/models/fields/related.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from django.db.models.query import QuerySet
from django.db.models.query_utils import PathInfo
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, curry
from django.utils.translation import ugettext_lazy as _
Expand Down Expand Up @@ -340,7 +340,7 @@ def set_attributes_from_rel(self):
def related(self):
warnings.warn(
"Usage of field.related has been deprecated. Use field.rel instead.",
RemovedInDjango20Warning, 2)
RemovedInDjango110Warning, 2)
return self.rel

def do_related_class(self, other, cls):
Expand Down
Loading

0 comments on commit ae1d663

Please sign in to comment.