Commit c0bb1665 authored by Hanno Schlichting's avatar Hanno Schlichting

Removed the deprecated ``five:containerEvents`` directive, which had been a...

Removed the deprecated ``five:containerEvents`` directive, which had been a no-op for quite a while.
parent d8a74886
...@@ -11,6 +11,9 @@ Trunk (unreleased) ...@@ -11,6 +11,9 @@ Trunk (unreleased)
Restructuring Restructuring
+++++++++++++ +++++++++++++
- Removed the deprecated ``five:containerEvents`` directive, which had been
a no-op for quite a while.
- Removed Products.Five.fivedirectives.IBridgeDirective - a leftover from the - Removed Products.Five.fivedirectives.IBridgeDirective - a leftover from the
Interface to zope.interface bridging code. Interface to zope.interface bridging code.
......
...@@ -91,11 +91,6 @@ Declare menuItems ...@@ -91,11 +91,6 @@ Declare menuItems
five ``http://namespaces.zope.org/five`` five ``http://namespaces.zope.org/five``
======================================== ========================================
implements
----------
Make a class declare it implements an interface.
loadProducts loadProducts
------------ ------------
...@@ -113,13 +108,6 @@ sizable ...@@ -113,13 +108,6 @@ sizable
Retrieve size information for a Zope 2 content class via a Zope 3 Retrieve size information for a Zope 2 content class via a Zope 3
style ``ISized`` adapter. style ``ISized`` adapter.
containerEvents
---------------
Make events be sent for Zope 2 container objects, instead of calling old
methods like ``manage_afterAdd``. These old methods will still be called
for classes specified in a ``deprecatedManageAddDelete`` directive.
deprecatedManageAddDelete deprecatedManageAddDelete
------------------------- -------------------------
......
...@@ -18,14 +18,8 @@ Zope 2 objects. ...@@ -18,14 +18,8 @@ Zope 2 objects.
$Id$ $Id$
""" """
import warnings
from OFS.subscribers import deprecatedManageAddDeleteClasses from OFS.subscribers import deprecatedManageAddDeleteClasses
def setContainerEvents():
warnings.warn("Using <five:containerEvents/> is deprecated (it is now "
"the default).",
DeprecationWarning)
def setDeprecatedManageAddDelete(class_): def setDeprecatedManageAddDelete(class_):
"""Instances of the class will still see their old methods called.""" """Instances of the class will still see their old methods called."""
deprecatedManageAddDeleteClasses.append(class_) deprecatedManageAddDeleteClasses.append(class_)
...@@ -33,13 +27,6 @@ def setDeprecatedManageAddDelete(class_): ...@@ -33,13 +27,6 @@ def setDeprecatedManageAddDelete(class_):
def cleanUp(): def cleanUp():
deprecatedManageAddDeleteClasses[:] = [] deprecatedManageAddDeleteClasses[:] = []
def containerEvents(_context):
_context.action(
discriminator=None,
callable=setContainerEvents,
args=(),
)
def deprecatedManageAddDelete(_context, class_): def deprecatedManageAddDelete(_context, class_):
_context.action( _context.action(
discriminator=('five:deprecatedManageAddDelete', class_), discriminator=('five:deprecatedManageAddDelete', class_),
......
...@@ -47,9 +47,6 @@ class ISizableDirective(Interface): ...@@ -47,9 +47,6 @@ class ISizableDirective(Interface):
required=True required=True
) )
class IContainerEventsDirective(Interface):
"""Global switch to enable container events
"""
class IDeprecatedManageAddDeleteDirective(Interface): class IDeprecatedManageAddDeleteDirective(Interface):
"""Call manage_afterAdd & co for these contained content classes. """Call manage_afterAdd & co for these contained content classes.
......
...@@ -35,12 +35,6 @@ ...@@ -35,12 +35,6 @@
handler=".fiveconfigure.loadProductsOverrides" handler=".fiveconfigure.loadProductsOverrides"
/> />
<meta:directive
name="containerEvents"
schema=".fivedirectives.IContainerEventsDirective"
handler=".eventconfigure.containerEvents"
/>
<meta:directive <meta:directive
name="deprecatedManageAddDelete" name="deprecatedManageAddDelete"
schema=".fivedirectives.IDeprecatedManageAddDeleteDirective" schema=".fivedirectives.IDeprecatedManageAddDeleteDirective"
......
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