diff options
| author | Tim Graham <timograham@gmail.com> | 2015-09-01 10:15:59 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-09-23 19:31:10 -0400 |
| commit | fd6a299cd06fac615ccb9006df0dd98cd8461cc5 (patch) | |
| tree | c2a19b2eafd05e786be4d861e389c347a7bc3d9a /django/db/models/sql/query.py | |
| parent | 7140d4adf724347aceda1cec7d194f0403fba027 (diff) | |
Refs #14030 -- Removed backwards compatiblity for old-style aggregates.
Per deprecation timeline.
Diffstat (limited to 'django/db/models/sql/query.py')
| -rw-r--r-- | django/db/models/sql/query.py | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 9dd666040f..cb1696dd62 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -7,7 +7,6 @@ databases). The abstraction barrier only works one way: this module has to know all about the internals of models in order to get the information it needs. """ import copy -import warnings from collections import Counter, Iterator, Mapping, OrderedDict from itertools import chain, count, product from string import ascii_uppercase @@ -31,7 +30,6 @@ from django.db.models.sql.where import ( AND, OR, ExtraWhere, NothingNode, WhereNode, ) from django.utils import six -from django.utils.deprecation import RemovedInDjango110Warning from django.utils.encoding import force_text from django.utils.tree import Node @@ -214,13 +212,6 @@ class Query(object): self._annotations = OrderedDict() return self._annotations - @property - def aggregates(self): - warnings.warn( - "The aggregates property is deprecated. Use annotations instead.", - RemovedInDjango110Warning, stacklevel=2) - return self.annotations - def __str__(self): """ Returns the query as a string of SQL with the parameter values @@ -973,12 +964,6 @@ class Query(object): alias = seen[int_model] = joins[-1] return alias or seen[None] - def add_aggregate(self, aggregate, model, alias, is_summary): - warnings.warn( - "add_aggregate() is deprecated. Use add_annotation() instead.", - RemovedInDjango110Warning, stacklevel=2) - self.add_annotation(aggregate, alias, is_summary) - def add_annotation(self, annotation, alias, is_summary=False): """ Adds a single annotation expression to the Query @@ -1818,12 +1803,6 @@ class Query(object): """ target[model] = {f.attname for f in fields} - def set_aggregate_mask(self, names): - warnings.warn( - "set_aggregate_mask() is deprecated. Use set_annotation_mask() instead.", - RemovedInDjango110Warning, stacklevel=2) - self.set_annotation_mask(names) - def set_annotation_mask(self, names): "Set the mask of annotations that will actually be returned by the SELECT" if names is None: @@ -1832,12 +1811,6 @@ class Query(object): self.annotation_select_mask = set(names) self._annotation_select_cache = None - def append_aggregate_mask(self, names): - warnings.warn( - "append_aggregate_mask() is deprecated. Use append_annotation_mask() instead.", - RemovedInDjango110Warning, stacklevel=2) - self.append_annotation_mask(names) - def append_annotation_mask(self, names): if self.annotation_select_mask is not None: self.set_annotation_mask(set(names).union(self.annotation_select_mask)) @@ -1875,13 +1848,6 @@ class Query(object): return self.annotations @property - def aggregate_select(self): - warnings.warn( - "aggregate_select() is deprecated. Use annotation_select() instead.", - RemovedInDjango110Warning, stacklevel=2) - return self.annotation_select - - @property def extra_select(self): if self._extra_select_cache is not None: return self._extra_select_cache |
