id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 10197 Foriegn Key breaks pickling of QuerySet james@… nobody "I'm using the latest version from svn (as of 1-4-09) and python2.5. I'm trying to pickle a QuerySet that is using annotate and I'm getting the following error: {{{ raise TypeError, ""can't pickle %s objects"" % base.__name__ TypeError: can't pickle function objects }}} Here is what I'm trying to do: (ProductChannel has OneToMany relationship with ProductChannelImage) {{{ pc = ProductChannel.objects.filter(supplier=supplier) pc = pc.filter(status='new') pc = pc.annotate(num_images=Count('productchannelimage')) ... request.session['pc_qs'] = dumps(pc.query) }}} Before I added the annotation to the query it was pickling just fine." closed Core (Cache system) dev fixed pickle, queryset, annotate Unreviewed 0 0 1 0 0 0