Commit b7af591e authored by Hanno Schlichting's avatar Hanno Schlichting

Marked the ``<five:implements />`` as officially deprecated. The standard...

Marked the ``<five:implements />`` as officially deprecated. The standard ``<class />`` directive allows the same.
parent 1576370d
......@@ -11,6 +11,9 @@ Trunk (unreleased)
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.
......
......@@ -20,6 +20,7 @@ $Id$
import os
import glob
import logging
import warnings
import App.config
import Products
......@@ -94,6 +95,11 @@ def loadProductsOverrides(_context, file=None, files=None, package=None):
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,
......
......@@ -23,6 +23,7 @@ from zope.configuration.fields import Bool
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.
"""
......
......@@ -35,12 +35,6 @@
handler=".fiveconfigure.loadProductsOverrides"
/>
<meta:directive
name="implements"
schema=".fivedirectives.IImplementsDirective"
handler=".fiveconfigure.implements"
/>
<meta:directive
name="containerEvents"
schema=".fivedirectives.IContainerEventsDirective"
......@@ -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>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment