mirror of
https://github.com/django/django.git
synced 2025-10-29 16:46:11 +00:00
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
This commit is contained in:
@@ -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[:]
|
||||
|
||||
Reference in New Issue
Block a user