diff options
Diffstat (limited to 'django/db/models/sql')
| -rw-r--r-- | django/db/models/sql/aggregates.py | 4 | ||||
| -rw-r--r-- | django/db/models/sql/compiler.py | 4 | ||||
| -rw-r--r-- | django/db/models/sql/query.py | 12 |
3 files changed, 10 insertions, 10 deletions
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 6aab204598..688e3f741e 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 @@ -329,7 +329,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 d0b56449b2..7a0fe8f892 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -31,7 +31,7 @@ from django.db.models.sql.where import ( ) from django.utils import six from django.utils.deprecation import ( - RemovedInDjango19Warning, RemovedInDjango20Warning, + RemovedInDjango19Warning, RemovedInDjango110Warning, ) from django.utils.encoding import force_text from django.utils.tree import Node @@ -201,7 +201,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): @@ -971,7 +971,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): @@ -1887,7 +1887,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): @@ -1901,7 +1901,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): @@ -1944,7 +1944,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 |
