[Zope-dev] Zope 2.12 and Five - setting of Products.meta_types
optilude+lists at gmail.com
Fri Nov 6 03:21:37 EST 2009
Martin Aspeli wrote:
> Something has changed in Zope 2.12 that is causing tests that use
> PlacelessSetup's tearDown() with Five to fail:
> Error in test
> Traceback (most recent call last):
> line 2416, in debug
> line 2295, in tearDown
> line 59, in tearDown
> line 55, in cleanUp
> line 63, in cleanUp
> func(*args, **kw)
> 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.
> 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 couldn't find a deeper problem, so I just added some safety to the
cleanUp() method using getattr(). If anyone thinks this is a bad idea,
let me know.
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book
More information about the Zope-Dev