[Zope3-checkins] CVS: Zope3/src/zope/configuration - interfaces.py:1.1 meta.py:1.4 metametaconfigure.py:1.4 metametaconfigurefordocgen.py:1.4

Jim Fulton jim@zope.com
Mon, 30 Dec 2002 21:52:43 -0500


Update of /cvs-repository/Zope3/src/zope/configuration
In directory cvs.zope.org:/tmp/cvs-serv22334/src/zope/configuration

Modified Files:
	meta.py metametaconfigure.py metametaconfigurefordocgen.py 
Added Files:
	interfaces.py 
Log Message:
Moved some missplaced interface files.


=== Added File Zope3/src/zope/configuration/interfaces.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################

from zope.interface import Interface

class INonEmptyDirective(Interface):

    def __call__(context,**kw):
        """Compute subdirective handler

        context -- an execution context that the directive may use for
          things like resolving names

        kw -- a dictionary containing the values of any attributes
          that were specified on the directive

        Return an ISubdirectiveHandler.
        """

class IEmptyDirective(Interface):

    def __call__(context,**kw):
        """Compute configuration actions

        context -- an execution context that the directive may use for
          things like resolving names

        kw -- a dictionary containing the values of any attributes
          that were specified on the directive

        Return a sequence of configuration actions. Each action is a
        tuple with:

        - A discriminator, value used to identify conflicting
          actions. Actions conflict if they have the same values
          for their discriminators.

        - callable object

        - argument tuple

        - and, optionally, a keyword argument dictionary.

        The callable object will be called with the argument tuple and
        keyword arguments to perform the action.
        """


class ISubdirectiveHandler(Interface):
    """Handle subdirectives

    Provide methods for registered subdirectives. The methods are
    typically IEmptyDirective objects. They could, theoretically be
    INonEmptyDirective objects.

    Also provide a call that can provide additional configuration
    actions.

    """

    def __call__():
        """Return a sequence of configuration actions.

        See IEmptyDirective for a definition of configuration actions.

        This method should be called *after* any subdirective methods are
        called during the processing of the (sub)directive whose subdirectives
        are being processed.  It may return an empty list.
        """


=== Zope3/src/zope/configuration/meta.py 1.3 => 1.4 ===
--- Zope3/src/zope/configuration/meta.py:1.3	Fri Dec 27 19:02:29 2002
+++ Zope3/src/zope/configuration/meta.py	Mon Dec 30 21:52:10 2002
@@ -19,8 +19,8 @@
 """
 
 
-from zope.interfaces.configuration import INonEmptyDirective
-from zope.interfaces.configuration import ISubdirectiveHandler
+from zope.configuration.interfaces import INonEmptyDirective
+from zope.configuration.interfaces import ISubdirectiveHandler
 
 class InvalidDirective(Exception):
     """An invalid directive was used"""


=== Zope3/src/zope/configuration/metametaconfigure.py 1.3 => 1.4 ===
--- Zope3/src/zope/configuration/metametaconfigure.py:1.3	Fri Dec 27 18:28:33 2002
+++ Zope3/src/zope/configuration/metametaconfigure.py	Mon Dec 30 21:52:10 2002
@@ -16,9 +16,9 @@
 """
 from zope.configuration.meta import DirectiveNamespace as bootstrapDirectiveNamespace
 from zope.configuration.meta import Subdirective as bootstrapSubdirective
-from zope.interfaces.configuration import INonEmptyDirective
-from zope.interfaces.configuration import IEmptyDirective
-from zope.interfaces.configuration import ISubdirectiveHandler
+from zope.configuration.interfaces import INonEmptyDirective
+from zope.configuration.interfaces import IEmptyDirective
+from zope.configuration.interfaces import ISubdirectiveHandler
 
 #
 # Meta-meta configuration.  These routines replace the bootstrap ones


=== Zope3/src/zope/configuration/metametaconfigurefordocgen.py 1.3 => 1.4 ===
--- Zope3/src/zope/configuration/metametaconfigurefordocgen.py:1.3	Fri Dec 27 18:28:33 2002
+++ Zope3/src/zope/configuration/metametaconfigurefordocgen.py	Mon Dec 30 21:52:10 2002
@@ -16,8 +16,8 @@
 """
 from zope.configuration.metametaconfigure import DirectiveNamespace as baseDirectiveNamespace
 from zope.configuration.metametaconfigure import Subdirective as baseSubdirective
-from zope.interfaces.configuration import INonEmptyDirective
-from zope.interfaces.configuration import ISubdirectiveHandler
+from zope.configuration.interfaces import INonEmptyDirective
+from zope.configuration.interfaces import ISubdirectiveHandler
 
 #
 # Versions of the meta configuration directive handlers that save the