I have finally found the time to work on this issue. There is a patch in the ticket (https://code.djangoproject.com/ticket/20289), and I think the patch does solve the regression.
I didn't find a simple test case that works in 1.4 but fails in 1.5. If anybody knows how to reproduce the original regression that would be very useful in ensuring the regression is really solved. - Anssi On 19 huhti, 02:06, akaariai <akaar...@gmail.com> wrote: > On 18 huhti, 22:07, Greg H <ghi...@gmail.com> wrote: > > > Running into a similar issue on my own project, seems to be when you try an > > cache a model which has a related model which in turn has a many to many > > field. So for example, I have an instance of a Student, which has a > > ForeignKey to Book, which in turn has a ManyToMany to Author. If I try and > > cache my Student instance, I get that pickling error. In Django 1.4 it > > worked fine, but not in 1.5. > > > Figure out a resolution to this? > > The problem is that for an instance of a class to be picklable the > class must be available as a module level attribute somewhere. For > dynamically created classes this is usually not true - they aren't > available at module level. One set of such classes is automatically > created through models for m2m fields. The automatic through classes > could explain the ManyToMany problem. > > All in all this looks like a regression that should be fixed in 1.5. I > created a ticket for this, see:https://code.djangoproject.com/ticket/20289 > > - Anssi -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.