-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 yuppie wrote:
Working on the five:registerClass directive for Five 1.2 and Zope 2.9 I had a closer look at the product initialization code.
I propose the following modifications for the dicts in Products.meta_types (set by registerClass):
1.) 'action' key: -----------------
I'd like to give empty 'action' values a special meaning: The meta_type is not visible in the add drop down in the ZMI.
The five:registerClass directive allows to set empty 'action' values.
This would resolve http://www.zope.org/Collectors/Zope/1885 .
Filtering out meta_types with empty 'action' values is a two line change in main.dtml. I'd like to make that change also on the 2.8 branch to enable that feature for 2.8.5 with Five 1.2.
+1.
2.) 'interfaces' key: ---------------------
Does currently only contain oldstyle interfaces. The code in OFS.ObjectManager that uses that key works also with z3 interfaces. I'd like to add z3 interfaces to the value of that key. That would e.g. allow to set only new style interfaces on catalog index classes.
I'd just as soon rip old-style interfaces out by the roots. +1 for allowing new-style ones in 2.8.x; -1 for continuing to support old-style ones on the trunk (anybody clever enough to use the old ones "back in the day" is clever enough, and should be motivated enough, to convert).
3.) 'product' key: ------------------
AFAICS it isn't used in Zope itself. I'd like to add a note that it might be removed in a future version.
+1.
4.) related cleanup: --------------------
Application.install_product has some backwards compatibility code for products that have initialization code outside the 'initialize' method of their __init__.py. This is deprecated at least for 5 years. I'd like to add explicit deprecation warnings on the 2.8 branch and to remove that code for Zope 2.9.
+1.
This isn't much work, it can all be done in time for the Zope 2.9 beta.
Any feedback is welcome. If there are no objections, I'll make the changes as proposed.
Tres. - -- =================================================================== Tres Seaver +1 202-558-7113 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDYPhi+gerLs4ltQ4RAjqAAKCa3BqERqXAC/uYPQp5n9Y8ZZL33QCeJ65o rKUDm17Qy3x+iNa1+5HxYnU= =e0ZF -----END PGP SIGNATURE-----