Hi Rob!

Rob Miller wrote:
yuppie, in the following change:


you removed the 'meta_type' attribute from the FactoryTypeInformation and ScriptableTypeInformation classes. i see that this matches similar changes made at the same time on the trunk, but the removal of these attributes causes the Archetypes unit tests to no longer run. do you have a problem w/ readding these attributes w/ a BBB comment?

The add forms for these classes are now views, so they have to be registered using the five:registerClass directive instead of the registerClass method.

five:registerClass sets the 'meta_type' attribute on startup. If the attribute exists already it just overrides it, so in normal use there should be no problem with re-adding these attributes for 1.6.

But there is an issue with unit tests: The PlacelessSetup tear down removes the 'meta_type' attribute, no matter if it was added by five:registerClass or if it existed before. If an other test that doesn't use PlacelessSetup tries to access FactoryTypeInformation.meta_type, this will return a wrong meta type.

In CMF itself this is no problem because CMF tests use PlacelessSetup if they depend on those meta types. But if you run Archetypes unit tests (or other non-PlacelessSetup tests that depend on meta_type) together with the CMF tests you might see strange failures.

five:registerClass is written for classes without 'meta_type' attribute. To support classes with 'meta_type' attribute properly, at least the tear down code has to be changed. But I doubt it's worth the effort. If you can work around this issue I'm fine with re-adding the attributes on the 1.6 branch. And in 2.0 we don't have this problem anyway.



Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to