Opened 16 years ago

Closed 16 years ago

Last modified 12 years ago

#10547 closed (fixed)

Delayed Loading Model Update Causes Recursive Errors

Reported by: megaman821@… Owned by: Malcolm Tredinnick
Component: Database layer (models, ORM) Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Alex Gaynor)

I don't really have much insight to this right now but here is the stack trace.

File "/var/www/next_django/apps/django/core/cache/backends/filebased.py" in set
  71.             pickle.dump(value, f, pickle.HIGHEST_PROTOCOL)
File "/var/www/next_django/apps/django/db/models/base.py" in __reduce__
  352.             return super(Model, self).__reduce__()
File "/var/www/next_django/apps/django/db/models/base.py" in __reduce__
  352.             return super(Model, self).__reduce__()
File "/var/www/next_django/apps/django/db/models/base.py" in __reduce__
  352.             return super(Model, self).__reduce__()
File "/var/www/next_django/apps/django/db/models/base.py" in __reduce__

Change History (7)

comment:1 by Alex Gaynor, 16 years ago

Description: modified (diff)

Fixed formatting. What is it you're trying to do that causes this error?

comment:2 by megaman821@…, 16 years ago

I am running a stachmo store. One of the satchmo apps is called keyedcache eventually makes a call to cache.set(key, val, length) which sets off this whole chain.

comment:3 by megaman821@…, 16 years ago

Also of note this error happened on Python 2.4

comment:4 by Malcolm Tredinnick, 16 years ago

Triage Stage: UnreviewedAccepted

Somebody's going to have to work out a slightly smaller example than "it happens somewhere in satchmo doing something unspecified". I can't see why recursive calls to __reduce__() should be happening, so I'm going to need a repeatable case to debug this.

comment:5 by Malcolm Tredinnick, 16 years ago

Owner: changed from nobody to Malcolm Tredinnick
Status: newassigned

Ok, I've managed to replicate this now (the test suite does it, in fact) using Python 2.4.

comment:6 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: assignedclosed

(In [10099]) 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.

comment:7 by Claude Paroz <claude@…>, 12 years ago

In [146aff3bac974e56ec8cb597c2720d1cd4f77b26]:

Fixed #18590 - Reverted Python 2.4 workaround for Model pickling

Revert of 08d521efa0. Refs #10547, #12121.
Thanks Michal Petrucha for the report.

Note: See TracTickets for help on using tickets.
Back to Top