[Zope-dev] Zope 2.12 and Five - setting of Products.meta_types

Hanno Schlichting hanno at hannosch.eu
Fri Nov 6 08:01:34 EST 2009

On Fri, Nov 6, 2009 at 7:14 AM, Martin Aspeli <optilude+lists at gmail.com> wrote:
> Something has changed in Zope 2.12 that is causing tests that use
> PlacelessSetup's tearDown() with Five to fail:
> "/Users/optilude/.buildout/eggs/Zope2-2.12.1-py2.6-macosx-10.6-i386.egg/Products/Five/fiveconfigure.py",
> line 228, in cleanUp
>     Products.meta_types = tuple([ info for info in Products.meta_types
> AttributeError: 'module' object has no attribute 'meta_types'
> Sure enough, Products.meta_types is not set. In the Zope2 egg,
> Products/__init__.py contains only the setuptools boilerplate for
> namespace packages. I'm not sure how or where Products.meta_type is set
> these days.

This is all part of App.ProductContext and friends. It's also set in
fiveconfigure during _registerClass or in ZopeTestCase's

> Does anyone know how to correctly fix this? We could make the tear-down
> code in Five more robust, obviously, but I fear that's just hiding a
> deeper problem?

I don't know who actually needs and reads this type of information.
It's one part of the Zope2 universe I think at least Plone doesn't use
anymore at all. Simply grepping for meta_types doesn't show any place
that uses the information for anything useful anymore. Maybe my work
in making the persistent product registry optional got rid of the last
places this had been used.


More information about the Zope-Dev mailing list