summaryrefslogtreecommitdiff
path: root/django/db/models/base.py
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2009-03-20 01:37:11 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2009-03-20 01:37:11 +0000
commit255cb391d16238d07ca530e3e2d41c897858231d (patch)
tree7cc00cc8b69d280259ef48b8f408618ba4fc1718 /django/db/models/base.py
parente3139cc0757919795a8cdd24a110419d725b86ea (diff)
Fixed #10547 -- Worked around some odd behaviour in Python 2.3 and 2.4.
Calling the super() version of __reduce__ in Model.__reduce__ led to infinite loops in Python prior to 2.5. We don't do that any longer. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10099 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/base.py')
-rw-r--r--django/db/models/base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/models/base.py b/django/db/models/base.py
index 2136ed3da4..cf5903d289 100644
--- a/django/db/models/base.py
+++ b/django/db/models/base.py
@@ -348,9 +348,9 @@ class Model(object):
need to do things manually, as they're dynamically created classes and
only module-level classes can be pickled by the default path.
"""
- if not self._deferred:
- return super(Model, self).__reduce__()
data = self.__dict__
+ if not self._deferred:
+ return (self.__class__, (), data)
defers = []
pk_val = None
for field in self._meta.fields: