#280 Cache Bug


I think the caching call on line 1693 of main.py may be broken because it references 'id' instead of 'self.id' and 'id' isn't defined locally so it's referencing the global built-in function 'id'.


  • Oleg Broytman

    Oleg Broytman - 2013-05-22
    • assigned_to: Oleg Broytman
    • Group: SQLObject_from_repository --> SQLObject_release_(specify)
  • Oleg Broytman

    Oleg Broytman - 2013-05-22

    You are right, it must be self.id. Thank you! I'll fix it ASAP.

  • Oleg Broytman

    Oleg Broytman - 2013-05-27
    • status: open --> closed-fixed
  • Oleg Broytman

    Oleg Broytman - 2013-05-27

    The problem was not only with self.id but that every SQLObject instance has a weak proxy to itself and pickling does strange things — it calls __getstate__ twice on pickling and calls __setstate__ twice on unpickling. The second call to __setstate__ is certainly a source of problems with cache.

    I fixed the problem by avoiding pickling the weak proxy and restoring the proxy on unpickling. Committed in the revisions 4601, 4602 (branch 1.3), 4603 (1.4), 4604 (the trunk).

    Thank you very much for helping to find and fix he problems!


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks