diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2011-03-28 02:11:19 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2011-03-28 02:11:19 +0000 |
| commit | 13864703bc1d5dd4dac63c96c6a4b42a392bc57f (patch) | |
| tree | 64d070fb754332d47afc310daef2671c54e17988 /django/db/models/sql | |
| parent | a87be3554fc73a567b926ea51c13ea844b5113f8 (diff) | |
Removed a bunch more Python 2.4 workarounds now that we don't support that version. Refs #15702 -- thanks to jonash for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/sql')
| -rw-r--r-- | django/db/models/sql/query.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index ea89771ed1..449c83b495 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -7,7 +7,7 @@ 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. """ -from django.utils.copycompat import deepcopy +import copy from django.utils.tree import Node from django.utils.datastructures import SortedDict from django.utils.encoding import force_unicode @@ -244,19 +244,19 @@ class Query(object): obj.dupe_avoidance = self.dupe_avoidance.copy() obj.select = self.select[:] obj.tables = self.tables[:] - obj.where = deepcopy(self.where, memo=memo) + obj.where = copy.deepcopy(self.where, memo=memo) obj.where_class = self.where_class if self.group_by is None: obj.group_by = None else: obj.group_by = self.group_by[:] - obj.having = deepcopy(self.having, memo=memo) + obj.having = copy.deepcopy(self.having, memo=memo) obj.order_by = self.order_by[:] obj.low_mark, obj.high_mark = self.low_mark, self.high_mark obj.distinct = self.distinct obj.select_related = self.select_related obj.related_select_cols = [] - obj.aggregates = deepcopy(self.aggregates, memo=memo) + obj.aggregates = copy.deepcopy(self.aggregates, memo=memo) if self.aggregate_select_mask is None: obj.aggregate_select_mask = None else: @@ -279,7 +279,7 @@ class Query(object): obj._extra_select_cache = self._extra_select_cache.copy() obj.extra_tables = self.extra_tables obj.extra_order_by = self.extra_order_by - obj.deferred_loading = deepcopy(self.deferred_loading, memo=memo) + obj.deferred_loading = copy.deepcopy(self.deferred_loading, memo=memo) if self.filter_is_sticky and self.used_aliases: obj.used_aliases = self.used_aliases.copy() else: @@ -476,7 +476,7 @@ class Query(object): # Now relabel a copy of the rhs where-clause and add it to the current # one. if rhs.where: - w = deepcopy(rhs.where) + w = copy.deepcopy(rhs.where) w.relabel_aliases(change_map) if not self.where: # Since 'self' matches everything, add an explicit "include @@ -497,7 +497,7 @@ class Query(object): if isinstance(col, (list, tuple)): self.select.append((change_map.get(col[0], col[0]), col[1])) else: - item = deepcopy(col) + item = copy.deepcopy(col) item.relabel_aliases(change_map) self.select.append(item) self.select_fields = rhs.select_fields[:] |
