Log message for revision 107507: Marked the ``<five:implements />`` as officially deprecated. The standard ``<class />`` directive allows the same.
Changed: U Zope/trunk/doc/CHANGES.rst U Zope/trunk/src/Products/Five/fiveconfigure.py U Zope/trunk/src/Products/Five/fivedirectives.py U Zope/trunk/src/Products/Five/meta.zcml -=- Modified: Zope/trunk/doc/CHANGES.rst =================================================================== --- Zope/trunk/doc/CHANGES.rst 2010-01-01 17:27:25 UTC (rev 107506) +++ Zope/trunk/doc/CHANGES.rst 2010-01-01 17:44:38 UTC (rev 107507) @@ -11,6 +11,9 @@ Restructuring +++++++++++++ +- Marked the ``<five:implements />`` as officially deprecated. The standard + ``<class />`` directive allows the same. + - Reuse IInclude from zope.configuration.xmlconfig. - Reuse IMenuItemType from zope.browsermenu. Modified: Zope/trunk/src/Products/Five/fiveconfigure.py =================================================================== --- Zope/trunk/src/Products/Five/fiveconfigure.py 2010-01-01 17:27:25 UTC (rev 107506) +++ Zope/trunk/src/Products/Five/fiveconfigure.py 2010-01-01 17:44:38 UTC (rev 107507) @@ -20,6 +20,7 @@ import os import glob import logging +import warnings import App.config import Products @@ -94,6 +95,11 @@ handleBrokenProduct(product) def implements(_context, class_, interface): + warnings.warn('Using <five:implements /> is deprecated. Please use the ' + '<class class="foo.Bar">' + '<implements interface="foo.interfaces.IBar" />' + '</class> directive instead.', + DeprecationWarning, stacklevel=2) for interface in interface: _context.action( discriminator = None, Modified: Zope/trunk/src/Products/Five/fivedirectives.py =================================================================== --- Zope/trunk/src/Products/Five/fivedirectives.py 2010-01-01 17:27:25 UTC (rev 107506) +++ Zope/trunk/src/Products/Five/fivedirectives.py 2010-01-01 17:44:38 UTC (rev 107507) @@ -23,6 +23,7 @@ from zope.schema import ASCII, TextLine +# Deprecated, the class directive from zope.security allows the same class IImplementsDirective(Interface): """State that a class implements something. """ Modified: Zope/trunk/src/Products/Five/meta.zcml =================================================================== --- Zope/trunk/src/Products/Five/meta.zcml 2010-01-01 17:27:25 UTC (rev 107506) +++ Zope/trunk/src/Products/Five/meta.zcml 2010-01-01 17:44:38 UTC (rev 107507) @@ -36,12 +36,6 @@ /> <meta:directive - name="implements" - schema=".fivedirectives.IImplementsDirective" - handler=".fiveconfigure.implements" - /> - - <meta:directive name="containerEvents" schema=".fivedirectives.IContainerEventsDirective" handler=".eventconfigure.containerEvents" @@ -77,6 +71,13 @@ handler=".fiveconfigure.registerPackage" /> + <!-- Deprecated, use the class directive instead. --> + <meta:directive + name="implements" + schema=".fivedirectives.IImplementsDirective" + handler=".fiveconfigure.implements" + /> + </meta:directives> </configure> _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins