Re: Is using version 2 of the pickle protocol in {DB,FileBased}Cache

2011-04-20 Thread Paul McMillan
Thanks for filing the bug. It's probably best to discuss higher-level stuff on the mailing list, and details of the ticket on the ticket. That said, there's a lot of overlap. While setting pickle to use a lower protocol would "fix" the problem, it's really only a bandaid. Lower versions of the pi

Re: Is using version 2 of the pickle protocol in {DB,FileBased}Cache

2011-04-20 Thread Raphael Kubo da Costa
Paul McMillan writes: > Ah, this does sound like a pretty nasty issue with our code then. > Unfortunately, the test suite doesn't get run as often as it should > with the various cache backends enabled, and I imagine that may be how > this cropped up. There have been a number of similar bugs in t

Re: Is using version 2 of the pickle protocol in {DB,FileBased}Cache

2011-04-19 Thread Paul McMillan
Ah, this does sound like a pretty nasty issue with our code then. Unfortunately, the test suite doesn't get run as often as it should with the various cache backends enabled, and I imagine that may be how this cropped up. There have been a number of similar bugs in the past - caching is hard! I'd a

Re: Is using version 2 of the pickle protocol in {DB,FileBased}Cache

2011-04-19 Thread Raphael Kubo da Costa
Paul McMillan writes: > Yes, SimpleCookie is known to be an unpickleable class. We shouldn't > be directly pickling it anywhere in Django. In your code, you should > probably turn the cookie into a string before caching it. I'm not > clear if the bug you're experiencing is happening in Django's c

Re: Is using version 2 of the pickle protocol in {DB,FileBased}Cache

2011-04-18 Thread Paul McMillan
Hi Raphael, Yes, SimpleCookie is known to be an unpickleable class. We shouldn't be directly pickling it anywhere in Django. In your code, you should probably turn the cookie into a string before caching it. I'm not clear if the bug you're experiencing is happening in Django's code or something yo

Is using version 2 of the pickle protocol in {DB,FileBased}Cache

2011-04-15 Thread Raphael Kubo da Costa
Hello there, I was experiencing some problems with Django's caching system on 1.2.X (1.2.5, to be more specific) when using either the database or the file-based backends. Both use pickle and call pickle.dumps(..., pickle.HIGHEST_PROTOCOL) when serializing the data after being called by UpdateCac