[Checkins] SVN: zope.interface/branches/chrism-componentregistry/src/zope/interface/interfaces.py move more unused interfaces to zope.component
Chris McDonough
chrism at plope.com
Sun Sep 11 11:46:27 EST 2011
Log message for revision 122769:
move more unused interfaces to zope.component
Changed:
U zope.interface/branches/chrism-componentregistry/src/zope/interface/interfaces.py
-=-
Modified: zope.interface/branches/chrism-componentregistry/src/zope/interface/interfaces.py
===================================================================
--- zope.interface/branches/chrism-componentregistry/src/zope/interface/interfaces.py 2011-09-11 16:40:16 UTC (rev 122768)
+++ zope.interface/branches/chrism-componentregistry/src/zope/interface/interfaces.py 2011-09-11 16:46:27 UTC (rev 122769)
@@ -763,10 +763,6 @@
class Invalid(Exception):
"""A component doesn't satisfy a promise."""
-class Misused(Exception):
- """A component is being used (registered) for the wrong interface."""
-
-
class IObjectEvent(Interface):
"""An event related to an object.
@@ -864,115 +860,6 @@
returned.
"""
-class IComponentRegistrationConvenience(Interface):
- """API for registering components.
-
- CAUTION: This API should only be used from test or
- application-setup code. This api shouldn't be used by regular
- library modules, as component registration is a configuration
- activity.
- """
-
- def provideUtility(component, provides=None, name=_u('')):
- """Register a utility globally
-
- A utility is registered to provide an interface with a
- name. If a component provides only one interface, then the
- provides argument can be omitted and the provided interface
- will be used. (In this case, provides argument can still be
- provided to provide a less specific interface.)
-
- CAUTION: This API should only be used from test or
- application-setup code. This API shouldn't be used by regular
- library modules, as component registration is a configuration
- activity.
-
- """
-
- def provideAdapter(factory, adapts=None, provides=None, name=_u('')):
- """Register an adapter globally
-
- An adapter is registered to provide an interface with a name
- for some number of object types. If a factory implements only
- one interface, then the provides argument can be omitted and
- the provided interface will be used. (In this case, a provides
- argument can still be provided to provide a less specific
- interface.)
-
- If the factory has an adapts declaration, then the adapts
- argument can be omitted and the declaration will be used. (An
- adapts argument can be provided to override the declaration.)
-
- CAUTION: This API should only be used from test or
- application-setup code. This API shouldn't be used by regular
- library modules, as component registration is a configuration
- activity.
- """
-
- def provideSubscriptionAdapter(factory, adapts=None, provides=None):
- """Register a subscription adapter
-
- A subscription adapter is registered to provide an interface
- for some number of object types. If a factory implements only
- one interface, then the provides argument can be omitted and
- the provided interface will be used. (In this case, a provides
- argument can still be provided to provide a less specific
- interface.)
-
- If the factory has an adapts declaration, then the adapts
- argument can be omitted and the declaration will be used. (An
- adapts argument can be provided to override the declaration.)
-
- CAUTION: This API should only be used from test or
- application-setup code. This API shouldn't be used by regular
- library modules, as component registration is a configuration
- activity.
- """
-
- def provideHandler(handler, adapts=None):
- """Register a handler
-
- Handlers are subscription adapter factories that don't produce
- anything. They do all of their work when called. Handlers
- are typically used to handle events.
-
- If the handler has an adapts declaration, then the adapts
- argument can be omitted and the declaration will be used. (An
- adapts argument can be provided to override the declaration.)
-
- CAUTION: This API should only be used from test or
- application-setup code. This API shouldn't be used by regular
- library modules, as component registration is a configuration
- activity.
- """
-
-class IRegistry(Interface):
- """Object that supports component registry
- """
-
- def registrations():
- """Return an iterable of component registrations
- """
-
-class IFactory(Interface):
- """A factory is responsible for creating other components."""
-
- title = Attribute("The factory title.")
-
- description = Attribute("A brief description of the factory.")
-
- def __call__(*args, **kw):
- """Return an instance of the objects we're a factory for."""
-
-
- def getInterfaces():
- """Get the interfaces implemented by the factory
-
- Return the interface(s), as an instance of Implements, that objects
- created by this factory will implement. If the callable's Implements
- instance cannot be created, an empty Implements instance is returned.
- """
-
class IRegistration(Interface):
"""A registration-information object
"""
More information about the checkins
mailing list