Fixed #11753 - Q objects with callables no longer explode on Python 2.4. Thanks, Jeremy Dunck.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11901 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jacob Kaplan-Moss 2009-12-17 22:06:41 +00:00
parent 3bd849062c
commit 574eafe4c0
24 changed files with 48 additions and 50 deletions

View file

@ -335,8 +335,10 @@ class SimpleLazyObject(LazyObject):
memo[id(self)] = result
return result
else:
import copy
return copy.deepcopy(self._wrapped, memo)
# Changed to use deepcopy from copycompat, instead of copy
# For Python 2.4.
from django.utils.copycompat import deepcopy
return deepcopy(self._wrapped, memo)
# Need to pretend to be the wrapped class, for the sake of objects that care
# about this (especially in equality tests)