[ZODB-Dev] Pickling problem caused by Python 2.2.2 ?!

Guido van Rossum guido@python.org
Sun, 08 Dec 2002 08:59:42 -0500


> >> Zope(HEAD), CMF(HEAD), Python 2.2.2 and CMFCollectorNG raised
> >> an exception "Can not pickle function objects" when I a new issue
> >> is submitted and commited to the ZODB. For debugging purposes I added
> >> code before the last action before the commit and "print obj.__reduce__"
> >> raises a "TypeError, Can't pickle objects in acquisition wrappers."
> >>
> >> The same problem persits with Zope 2.6 and CMF 1.3 and Python 2.2.2.
> >>
> >> Using Zope (2.6 or HEAD), CMF(1.3 or HEAD) and Python 2.1.3(!) works
> >> fine. This smells like a critical bug caused by some incompatibility with
> >> Python 2.2.2.
> >>
> >> Any ideas on this problem?
> >
> > I don't know where the code is that you're referring to, but could it
> > be that it works on 2.1.3 because there's a '__metaclass__ = type'
> > somewhere?
> 
> There is no such code that uses __metaclass__. What do you suggest as
> next step? Submitting an official bug report? If necessary I can provide
> a Zope sandbox where the error is reproducable.

How about posting a traceback?  I don't think this can debugged
without knowing where the exception happens.  Once you know that,
using a debugger to peek at variables would be the next step.  Since
it's your site, you can do that a lot more efficiently than someone
else.  If you post a bug report with just the above info, nothing will
happen to it.

--Guido van Rossum (home page: http://www.python.org/~guido/)