[Checkins] SVN: zope.component/trunk/ Remove deprecated stuff. Remove duplicated adapter declaration code. Clean up documentation a bit.

Dan Korostelev nadako at gmail.com
Mon Mar 2 11:01:59 EST 2009


Log message for revision 97420:
  Remove deprecated stuff. Remove duplicated adapter declaration code. Clean up documentation a bit.

Changed:
  A   zope.component/trunk/CHANGES.txt
  U   zope.component/trunk/README.txt
  U   zope.component/trunk/setup.py
  D   zope.component/trunk/src/zope/component/DEPENDENCIES.cfg
  U   zope.component/trunk/src/zope/component/README.txt
  U   zope.component/trunk/src/zope/component/__init__.py
  U   zope.component/trunk/src/zope/component/_api.py
  U   zope.component/trunk/src/zope/component/_declaration.py
  D   zope.component/trunk/src/zope/component/adapter.py
  D   zope.component/trunk/src/zope/component/back35.py
  U   zope.component/trunk/src/zope/component/bbb/interfaces.py
  D   zope.component/trunk/src/zope/component/contextdependent.py
  D   zope.component/trunk/src/zope/component/exceptions.py
  U   zope.component/trunk/src/zope/component/factory.py
  U   zope.component/trunk/src/zope/component/factory.txt
  U   zope.component/trunk/src/zope/component/globalregistry.py
  U   zope.component/trunk/src/zope/component/interfaces.py
  U   zope.component/trunk/src/zope/component/persistentregistry.py
  U   zope.component/trunk/src/zope/component/persistentregistry.txt
  U   zope.component/trunk/src/zope/component/registry.py
  D   zope.component/trunk/src/zope/component/service.py
  D   zope.component/trunk/src/zope/component/servicenames.py
  D   zope.component/trunk/src/zope/component/site.py
  U   zope.component/trunk/src/zope/component/socketexample.txt
  D   zope.component/trunk/src/zope/component/utility.py

-=-
Added: zope.component/trunk/CHANGES.txt
===================================================================
--- zope.component/trunk/CHANGES.txt	                        (rev 0)
+++ zope.component/trunk/CHANGES.txt	2009-03-02 16:01:59 UTC (rev 97420)
@@ -0,0 +1,79 @@
+CHANGES
+*******
+
+3.6.0 (unreleased)
+==================
+
+- Cleanup package documentation and changelog a bit.
+
+- Remove deprecated code.
+
+- Change package's mailing list address to zope-dev at zope.org, because
+  zope3-dev at zope.org is now retired.
+
+3.5.1 (2008-07-25)
+==================
+
+- Fix bug introduced in 3.5.0: <utility factory="..."> no longer supported
+  interfaces declared in Python and always wanted an explicit provides="..."
+  attribute. https://bugs.launchpad.net/zope3/+bug/251865
+
+3.5.0 (2008-07-25)
+==================
+
+- Support registration of utilities via factories through the component registry
+  and return factory information in the registration information. This fixes
+  https://bugs.launchpad.net/zope3/+bug/240631
+
+- Optimized un/registerUtility via storing an optimized data structure for
+  efficient retrieval of already registered utilities. This avoids looping over
+  all utilities when registering a new one.
+
+3.4.0 (2007-09-29)
+==================
+
+No further changes since 3.4.0a1.
+
+3.4.0a1 (2007-04-22)
+====================
+
+Corresponds to zope.component from Zope 3.4.0a1.
+
+- In the Zope 3.3.x series, ``zope.component`` was simplified yet once
+  more.  See http://wiki.zope.org/zope3/LocalComponentManagementSimplification
+  for the proposal describing the changes.
+
+3.2.0.2 (2006-04-15)
+====================
+
+- Fix packaging bug:  'package_dir' must be a *relative* path.
+
+3.2.0.1 (2006-04-14)
+====================
+
+- Packaging change: suppress inclusion of 'setup.cfg' in 'sdist' builds.
+
+3.2.0 (2006-01-05)
+==================
+
+Corresponds to the verison of the zope.component package shipped as part of
+the Zope 3.2.0 release.
+
+- Deprecated services and related APIs. The adapter and utility registries
+  are now available directly via the site manager's 'adapters' and 'utilities'
+  attributes, respectively.  Services are accessible, but deprecated, and
+  will be removed in Zope 3.3.
+
+- Deprectaed all presentation-related APIs, including all view-related
+  API functions. Use the adapter API functions instead.
+  See http://dev.zope.org/Zope3/ImplementViewsAsAdapters`
+
+- Deprecated 'contextdependent' package:  site managers are now looked up
+  via a thread global, set during URL traversal.  The 'context' argument
+  is now always optional, and should no longer be passed.
+
+3.0.0 (2004-11-07)
+==================
+
+Corresponds to the verison of the zope.component package shipped as part of
+the Zope X3.0.0 release.

Modified: zope.component/trunk/README.txt
===================================================================
--- zope.component/trunk/README.txt	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/README.txt	2009-03-02 16:01:59 UTC (rev 97420)
@@ -7,80 +7,3 @@
 defining, registering and looking up components.
 
 .. contents::
-
-Releases
-********
-
-3.6.0 (unreleased)
-==================
-
-Change package's mailing list address to zope-dev at zope.org, because
-zope3-dev at zope.org is now retired.
-
-3.5.1 (2008-07-25)
-==================
-
-Fix bug introduced in 3.5.0: <utility factory="..."> no longer supported
-interfaces declared in Python and always wanted an explicit provides="..."
-attribute. https://bugs.launchpad.net/zope3/+bug/251865
-
-3.5.0 (2008-07-25)
-==================
-
-Support registration of utilities via factories through the component registry
-and return factory information in the registration information. This fixes
-https://bugs.launchpad.net/zope3/+bug/240631
-
-Optimized un/registerUtility via storing an optimized data structure for
-efficient retrieval of already registered utilities. This avoids looping over
-all utilities when registering a new one.
-
-3.4.0 (2007-09-29)
-==================
-
-No further changes since 3.4.0a1.
-
-3.4.0a1 (2007-04-22)
-====================
-
-Corresponds to zope.component from Zope 3.4.0a1.
-
-In the Zope 3.3.x series, ``zope.component`` was simplified yet once
-more.  See http://wiki.zope.org/zope3/LocalComponentManagementSimplification
-for the proposal describing the changes.
-
-3.2.0.2 (2006/04/15)
-====================
-
-Fix packaging bug:  'package_dir' must be a *relative* path.
-
-zope.component version 3.2.0.1 (2006/04/14)
-----------------------------------------------
-
-Packaging change:  suppress inclusion of 'setup.cfg' in 'sdist' builds.
-
-3.2.0 (2006/01/05)
-==================
-
-Corresponds to the verison of the zope.component package shipped as part of
-the Zope 3.2.0 release.
-
-Deprecated services and related APIs. The adapter and utility registries
-are now available directly via the site manager's 'adapters' and 'utilities'
-attributes, respectively.  Services are accessible, but deprecated, and
-will be removed in Zope 3.3.
-
-Deprectaed all presentation-related APIs, including all view-related
-API functions. Use the adapter API functions instead.
-See http://dev.zope.org/Zope3/ImplementViewsAsAdapters`
-
-Deprecated 'contextdependent' package:  site managers are now looked up
-via a thread global, set during URL traversal.  The 'context' argument
-is now always optional, and should no longer be passed.
-
-3.0.0 (2004/11/07)
-==================
-
-Corresponds to the verison of the zope.component package shipped as part of
-the Zope X3.0.0 release.
-

Modified: zope.component/trunk/setup.py
===================================================================
--- zope.component/trunk/setup.py	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/setup.py	2009-03-02 16:01:59 UTC (rev 97420)
@@ -41,33 +41,39 @@
         + '\n' +
         read('src', 'zope', 'component', 'event.txt')
         + '\n' +
+        read('src', 'zope', 'component', 'factory.txt')
+        + '\n' +
         read('src', 'zope', 'component', 'registry.txt')
         + '\n' +
+        read('src', 'zope', 'component', 'persistentregistry.txt')
+        + '\n' +
+        read('src', 'zope', 'component', 'socketexample.txt')
+        + '\n' +
+        read('CHANGES.txt')
+        + '\n' +
         'Download\n'
-        '**********************\n'
+        '********\n'
         ),
     packages = find_packages('src'),
     package_dir = {'': 'src'},
 
     namespace_packages=['zope',],
     tests_require = ['zope.testing'],
-    install_requires=['zope.deprecation',
+    install_requires=['setuptools',
                       'zope.interface',
+                      'zope.event',
                       'zope.deferredimport',
-                      'zope.event',
-                      'setuptools',
                       ],
     include_package_data = True,
     zip_safe = False,
     extras_require = dict(
-        service = ['zope.exceptions'],
         zcml = ['zope.configuration',
                 'zope.security',
                 'zope.proxy',
                 'zope.i18nmessageid',
                 ],
-        test = ['zope.testing',
-                'ZODB3',
+        test = ['ZODB3',
+                'zope.testing',
                 'zope.hookable',
                 'zope.location',
                 ],

Deleted: zope.component/trunk/src/zope/component/DEPENDENCIES.cfg
===================================================================
--- zope.component/trunk/src/zope/component/DEPENDENCIES.cfg	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/DEPENDENCIES.cfg	2009-03-02 16:01:59 UTC (rev 97420)
@@ -1,5 +0,0 @@
-zope.exceptions
-zope.interface
-zope.testing
-zope.deprecation
-zope.deferredimport

Modified: zope.component/trunk/src/zope/component/README.txt
===================================================================
--- zope.component/trunk/src/zope/component/README.txt	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/README.txt	2009-03-02 16:01:59 UTC (rev 97420)
@@ -236,7 +236,7 @@
     True
 
 Subscription Adapters
-*********************
+---------------------
 
 Unlike regular adapters, subscription adapters are used when we want
 all of the adapters that adapt an object to a particular adapter.
@@ -323,7 +323,7 @@
     ['too short']
 
 Handlers
-********
+--------
 
 Handlers are subscription adapter factories that don't produce
 anything.  They do all of their work when called.  Handlers

Modified: zope.component/trunk/src/zope/component/__init__.py
===================================================================
--- zope.component/trunk/src/zope/component/__init__.py	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/__init__.py	2009-03-02 16:01:59 UTC (rev 97420)
@@ -15,9 +15,7 @@
 
 $Id$
 """
-import sys
 import zope.deferredimport
-import zope.interface
 from zope.interface import moduleProvides, Interface
 from zope.interface import providedBy, implementedBy
 from zope.component.interfaces import IComponentArchitecture
@@ -49,29 +47,5 @@
     'adapter', 'adapts', 'adaptedBy',
     )
 
-zope.deferredimport.deprecated(
-    "Use IComponentLookup instead.  ISiteManager will be removed in Zope 3.5.",
-    ISiteManager = "zope.component.interfaces:IComponentLookup",
-    )
-
 moduleProvides(IComponentArchitecture, IComponentRegistrationConvenience)
 __all__ = tuple(IComponentArchitecture)
-
-zope.deferredimport.deprecated(
-    "This object was deprecated long ago.  Only import is allowed now "
-    "and will be disallows in Zope 3.5.",
-    getGlobalServices = "zope.component.back35:deprecated",
-    getGlobalService = "zope.component.back35:deprecated",
-    getService = "zope.component.back35:deprecated",
-    getServiceDefinitions = "zope.component.back35:deprecated",
-    getView = "zope.component.back35:deprecated",
-    queryView = "zope.component.back35:deprecated",
-    getMultiView = "zope.component.back35:deprecated",
-    queryMultiView = "zope.component.back35:deprecated",
-    getViewProviding = "zope.component.back35:deprecated",
-    queryViewProviding = "zope.component.back35:deprecated",
-    getDefaultViewName = "zope.component.back35:deprecated",
-    queryDefaultViewName = "zope.component.back35:deprecated",
-    getResource = "zope.component.back35:deprecated",
-    queryResource = "zope.component.back35:deprecated",
-    )

Modified: zope.component/trunk/src/zope/component/_api.py
===================================================================
--- zope.component/trunk/src/zope/component/_api.py	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/_api.py	2009-03-02 16:01:59 UTC (rev 97420)
@@ -26,6 +26,7 @@
 from zope.component.interfaces import ComponentLookupError
 from zope.component.interfaces import IComponentLookup
 from zope.component.globalregistry import base
+from zope.component._declaration import adapter, adapts, adaptedBy
 
 # Try to be hookable. Do so in a try/except to avoid a hard dependency.
 try:
@@ -136,48 +137,6 @@
     for ignored in sitemanager.subscribers(objects, None):
         pass
 
-class _adapts_descr(object):
-    def __init__(self, interfaces):
-        self.interfaces = interfaces
-
-    def __get__(self, inst, cls):
-        if inst is None:
-            return self.interfaces
-        raise AttributeError('__component_adapts__')
-
-_class_types = type, types.ClassType
-class adapter:
-
-    def __init__(self, *interfaces):
-        self.interfaces = interfaces
-
-    def __call__(self, ob):
-        if isinstance(ob, _class_types):
-            ob.__component_adapts__ = _adapts_descr(self.interfaces)
-        else:
-            ob.__component_adapts__ = self.interfaces
-
-        return ob
-
-def adapts(*interfaces):
-    frame = sys._getframe(1)
-    locals = frame.f_locals
-
-    # Try to make sure we were called from a class def. In 2.2.0 we can't
-    # check for __module__ since it doesn't seem to be added to the locals
-    # until later on.
-    if (locals is frame.f_globals) or (
-        ('__module__' not in locals) and sys.version_info[:3] > (2, 2, 0)):
-        raise TypeError("adapts can be used only from a class definition.")
-
-    if '__component_adapts__' in locals:
-        raise TypeError("adapts can be used only once in a class definition.")
-
-    locals['__component_adapts__'] = _adapts_descr(interfaces)
-
-def adaptedBy(ob):
-    return getattr(ob, '__component_adapts__', None)
-
 #############################################################################
 # Register the component architectures adapter hook, with the adapter hook
 # registry of the `zope.inteface` package. This way we will be able to call

Modified: zope.component/trunk/src/zope/component/_declaration.py
===================================================================
--- zope.component/trunk/src/zope/component/_declaration.py	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/_declaration.py	2009-03-02 16:01:59 UTC (rev 97420)
@@ -11,31 +11,13 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-"""Zope 3 Component Architecture
+"""Adapter declarations
 
 $Id$
 """
 import types
 import sys
-from zope.interface import Interface
-from zope.interface import providedBy, implementedBy
-from zope.component.interfaces import IComponentArchitecture
-from zope.component.interfaces import IComponentRegistrationConvenience
-from zope.component.interfaces import IDefaultViewName
-from zope.component.interfaces import IFactory
-from zope.component.interfaces import ComponentLookupError
-from zope.component.interfaces import IComponentLookup
 
-class _adapts_descr(object):
-    def __init__(self, interfaces):
-        self.interfaces = interfaces
-
-    def __get__(self, inst, cls):
-        if inst is None:
-            return self.interfaces
-        raise AttributeError('__component_adapts__')
-
-_class_types = type, types.ClassType
 class adapter:
 
     def __init__(self, *interfaces):
@@ -67,3 +49,14 @@
 
 def adaptedBy(ob):
     return getattr(ob, '__component_adapts__', None)
+
+_class_types = type, types.ClassType
+
+class _adapts_descr(object):
+    def __init__(self, interfaces):
+        self.interfaces = interfaces
+
+    def __get__(self, inst, cls):
+        if inst is None:
+            return self.interfaces
+        raise AttributeError('__component_adapts__')

Deleted: zope.component/trunk/src/zope/component/adapter.py
===================================================================
--- zope.component/trunk/src/zope/component/adapter.py	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/adapter.py	2009-03-02 16:01:59 UTC (rev 97420)
@@ -1,169 +0,0 @@
-##############################################################################
-#
-# 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.1 (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.
-#
-##############################################################################
-
-
-import warnings
-
-warnings.warn("This module is deprecated and will go away in Zope 3.5. ",
-              DeprecationWarning, 2)
-
-
-import sys
-import warnings
-from types import ClassType
-
-from zope.component.interfaces import IRegistry, ComponentLookupError
-from zope.component.bbb.interfaces import IAdapterService
-from zope.component.bbb.service import GlobalService
-from zope.component.registry import AdapterRegistration, SubscriptionRegistration
-from zope.interface import implements, providedBy, Interface, implementedBy
-from zope.interface.interfaces import IInterface
-
-class IGlobalAdapterService(IAdapterService, IRegistry):
-
-    def register(required, provided, name, factory, info=''):
-        """Register an adapter factory
-
-        :Parameters:
-          - `required`: a sequence of specifications for objects to be
-             adapted.
-          - `provided`: The interface provided by the adapter
-          - `name`: The adapter name
-          - `factory`: The object used to compute the adapter
-          - `info`: Provide some info about this particular adapter.
-        """
-
-    def subscribe(required, provided, factory, info=''):
-        """Register a subscriber factory
-
-        :Parameters:
-          - `required`: a sequence of specifications for objects to be
-             adapted.
-          - `provided`: The interface provided by the adapter
-          - `name`: The adapter name
-          - `factory`: The object used to compute the subscriber
-          - `info`: Provide some info about this particular adapter.
-        """
-
-class AdapterService(object):
-    """Base implementation of an adapter service, implementing only the
-    `IAdapterService` interface.
-
-    No write-methods were implemented.
-    """
-
-    implements(IAdapterService)
-
-    def __init__(self, sitemanager=None):
-        if sitemanager is None:
-            from zope.component.globalregistry import BaseGlobalComponents
-            sitemanager = BaseGlobalComponents()
-        self.sm = sitemanager
-
-    def __getattr__(self, name):
-        attr = getattr(self.sm.adapters, name)
-        if attr is not None:
-            return attr
-        raise AttributeError(name)
-
-
-class GlobalAdapterService(AdapterService, GlobalService):
-    """Global Adapter Service implementation."""
-
-    implements(IGlobalAdapterService)
-
-    def __init__(self, sitemanager=None):
-        super(GlobalAdapterService, self).__init__(sitemanager)
-
-    def register(self, required, provided, name, factory, info=''):
-        """Register an adapter
-
-        >>> registry = GlobalAdapterService()
-        >>> class R1(Interface):
-        ...     pass
-        >>> class R2(R1):
-        ...     pass
-        >>> class P1(Interface):
-        ...     pass
-        >>> class P2(P1):
-        ...     pass
-
-        >>> registry.register((R1, ), P2, 'bob', 'c1', 'd1')
-        >>> registry.register((R1, ), P2,    '', 'c2', 'd2')
-        >>> registry.lookup((R2, ), P1, '')
-        'c2'
-
-        >>> registrations = map(repr, registry.registrations())
-        >>> registrations.sort()
-        >>> for registration in registrations:
-        ...    print registration
-        AdapterRegistration(('R1',), 'P2', '', 'c2', 'd2')
-        AdapterRegistration(('R1',), 'P2', 'bob', 'c1', 'd1')
-
-        Let's make sure that we can also register regular classes for
-        adaptation.
-
-        >>> class O1(object):
-        ...     pass
-        >>> class O2(object):
-        ...     pass
-        >>> class O3(object):
-        ...     def __init__(self, obj1, obj2=None):
-        ...         pass
-
-        >>> registry.register((O1, ), R1, '', O3)
-        >>> registry.queryAdapter(O1(), R1, '').__class__
-        <class 'zope.component.bbb.adapter.O3'>
-
-        >>> registry.register((O1, O2), R1, '', O3)
-        >>> registry.queryMultiAdapter((O1(), O2()), R1, '').__class__
-        <class 'zope.component.bbb.adapter.O3'>
-        """
-        self.sm.provideAdapter(required, provided, name, factory, info)
-
-    def subscribe(self, required, provided, factory, info=''):
-        """Register an subscriptions adapter
-
-        >>> registry = GlobalAdapterService()
-        >>> class R1(Interface):
-        ...     pass
-        >>> class R2(R1):
-        ...     pass
-        >>> class P1(Interface):
-        ...     pass
-        >>> class P2(P1):
-        ...     pass
-
-        >>> registry.subscribe((R1, ), P2, 'c1', 'd1')
-        >>> registry.subscribe((R1, ), P2, 'c2', 'd2')
-        >>> subscriptions = map(str, registry.subscriptions((R2, ), P1))
-        >>> subscriptions.sort()
-        >>> subscriptions
-        ['c1', 'c2']
-
-        >>> registrations = map(repr, registry.registrations())
-        >>> registrations.sort()
-        >>> for registration in registrations:
-        ...    print registration
-        SubscriptionRegistration(('R1',), 'P2', 'c1', 'd1')
-        SubscriptionRegistration(('R1',), 'P2', 'c2', 'd2')
-
-        """
-        self.sm.subscribe(required, provided, factory, info)
-
-    def registrations(self):
-        for registration in self.sm.registrations():
-            if isinstance(registration,
-                          (AdapterRegistration, SubscriptionRegistration)):
-                yield registration

Deleted: zope.component/trunk/src/zope/component/back35.py
===================================================================
--- zope.component/trunk/src/zope/component/back35.py	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/back35.py	2009-03-02 16:01:59 UTC (rev 97420)
@@ -1,20 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2005 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (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.
-#
-##############################################################################
-"""Things to be deprecated.
-
-$Id$
-"""
-
-def deprecated(*args, **kw):
-    raise NotImplementedError("This function is no-longer implemented")

Modified: zope.component/trunk/src/zope/component/bbb/interfaces.py
===================================================================
--- zope.component/trunk/src/zope/component/bbb/interfaces.py	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/bbb/interfaces.py	2009-03-02 16:01:59 UTC (rev 97420)
@@ -19,254 +19,6 @@
 
 from zope.interface import Interface, Attribute
 
-
-class IBBBComponentArchitecture(Interface):
-    """The Component Architecture is defined by six key services,
-    all of which are managed by service managers.
-    """
-
-    # basic service manager tools
-
-    def getGlobalServices():
-        """Get the global service manager."""
-
-    def getGlobalService(name):
-        """Get a global service."""
-
-    def getServices(context=None):
-        """Get the service manager
-
-        If context is None, an application-defined policy is used to choose
-        an appropriate service manager.
-
-        If 'context' is not None, context is adapted to IServiceService, and
-        this adapter is returned.
-        """
-
-    def getService(name, context=None):
-        """Get a named service.
-
-        Returns the service defined by 'name' from the service manager.
-
-        If context is None, an application-defined policy is used to choose
-        an appropriate service manager.
-
-        If 'context' is not None, context is adapted to IServiceService, and
-        this adapter is returned.
-        """
-
-    def getServiceDefinitions(context=None):
-        """Get service definitions
-
-        Returns a dictionary of the service definitions from the service
-        manager in the format {nameString: serviceInterface}.
-
-        The default behavior of placeful service managers is to include
-        service definitions above them, but this can be overridden.
-
-        If context is None, an application-defined policy is used to choose
-        an appropriate service manager.
-
-        If 'context' is not None, context is adapted to IServiceService, and
-        this adapter is returned.
-        """
-
-    # Presentation service
-
-    def getView(object, name, request, providing=Interface, context=None):
-        """Get a named view for a given object.
-
-        The request must implement IPresentationRequest: it provides
-        the view type and the skin name.  The nearest one to the
-        object is found. If a matching view cannot be found, raises
-        ComponentLookupError.
-        """
-
-    def queryView(object, name, request,
-                  default=None, providing=Interface, context=None):
-        """Look for a named view for a given object.
-
-        The request must implement IPresentationRequest: it provides
-        the view type and the skin name.  The nearest one to the
-        object is found.  If a matching view cannot be found, returns
-        default.
-
-        If context is not specified, attempts to use object to specify
-        a context.
-        """
-
-    def getMultiView(objects, request, providing=Interface, name='',
-                     context=None):
-        """Look for a multi-view for given objects
-
-        The request must implement IPresentationRequest: it provides
-        the view type and the skin name.  The nearest one to the
-        object is found.  If a matching view cannot be found, raises
-        ComponentLookupError.
-
-        If context is not specified, attempts to use the first object
-        to specify a context.
-        """
-
-    def queryMultiView(objects, request, providing=Interface, name='',
-                       default=None, context=None):
-        """Look for a multi-view for given objects
-
-        The request must implement IPresentationRequest: it provides
-        the view type and the skin name.  The nearest one to the
-        object is found.  If a matching view cannot be found, returns
-        default.
-
-        If context is not specified, attempts to use the first object
-        to specify a context.
-        """
-
-    def getViewProviding(object, providing, request, context=None):
-        """Look for a view based on the interface it provides.
-
-        A call to this method is equivalent to:
-
-            getView(object, '', request, context, providing)
-        """
-
-    def queryViewProviding(object, providing, request,
-                           default=None, context=None):
-        """Look for a view that provides the specified interface.
-
-        A call to this method is equivalent to:
-
-            queryView(object, '', request, default, context, providing)
-        """
-
-    def getDefaultViewName(object, request, context=None):
-        """Get the name of the default view for the object and request.
-
-        The request must implement IPresentationRequest, and provides the
-        desired view type.  The nearest one to the object is found.
-        If a matching default view name cannot be found, raises
-        ComponentLookupError.
-
-        If context is not specified, attempts to use
-        object to specify a context.
-        """
-
-    def queryDefaultViewName(object, request, default=None, context=None):
-        """Look for the name of the default view for the object and request.
-
-        The request must implement IPresentationRequest, and provides
-        the desired view type.  The nearest one to the object is
-        found.  If a matching default view name cannot be found,
-        returns the default.
-
-        If context is not specified, attempts to use object to specify
-        a context.
-        """
-
-    def getResource(name, request, providing=Interface, context=None):
-        """Get a named resource for a given request
-
-        The request must implement IPresentationRequest.
-
-        The context provides a place to look for placeful resources.
-
-        A ComponentLookupError will be raised if the component can't
-        be found.
-        """
-
-    def queryResource(name, request, default=None, providing=Interface,
-                      context=None):
-        """Get a named resource for a given request
-
-        The request must implement IPresentationRequest.
-
-        The context provides a place to look for placeful resources.
-
-        If the component can't be found, the default is returned.
-        """
-
-
-class IServiceService(Interface):
-    """A service to manage Services."""
-
-    def getServiceDefinitions():
-        """Retrieve all Service Definitions
-
-        Should return a list of tuples (name, interface)
-        """
-
-    def getInterfaceFor(name):
-        """Retrieve the service interface for the given name
-        """
-
-    def getService(name):
-        """Retrieve a service implementation
-
-        Raises ComponentLookupError if the service can't be found.
-        """
-
-
-class IUtilityService(Interface):
-    """A service to manage Utilities."""
-
-    def getUtility(interface, name=''):
-        """Look up a utility that provides an interface.
-
-        If one is not found, raises ComponentLookupError.
-        """
-
-    def queryUtility(interface, name='', default=None):
-        """Look up a utility that provides an interface.
-
-        If one is not found, returns default.
-        """
-
-    def getUtilitiesFor(interface):
-        """Look up the registered utilities that provide an interface.
-
-        Returns an iterable of name-utility pairs.
-        """
-
-    def getAllUtilitiesRegisteredFor(interface):
-        """Return all registered utilities for an interface
-
-        This includes overwridden utilities.
-
-        An iterable of utility instances is returned.  No names are
-        returned.
-        """
-
-class IAdapterService(Interface):
-    """A service to manage Adapters."""
-
-    def queryAdapter(object, interface, name, default=None):
-        """Look for a named adapter to an interface for an object
-
-        If a matching adapter cannot be found, returns the default.
-
-        The name consisting of an empty string is reserved for unnamed
-        adapters. The unnamed adapter methods will often call the
-        named adapter methods with an empty string for a name.
-        """
-
-    def queryMultiAdapter(objects, interface, name, default=None):
-        """Look for a multi-adapter to an interface for an object
-
-        If a matching adapter cannot be found, returns the default.
-
-        The name consisting of an empty string is reserved for unnamed
-        adapters. The unnamed adapter methods will often call the
-        named adapter methods with an empty string for a name.
-        """
-
-    def subscribers(required, provided):
-        """Get subscribers
-
-        Subscribers are returned that provide the provided interface
-        and that depend on and are comuted from the sequence of
-        required objects.
-        """
-
-
 class IContextDependent(Interface):
     """Components implementing this interface must have a context component.
 

Deleted: zope.component/trunk/src/zope/component/contextdependent.py
===================================================================
--- zope.component/trunk/src/zope/component/contextdependent.py	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/contextdependent.py	2009-03-02 16:01:59 UTC (rev 97420)
@@ -1,32 +0,0 @@
-##############################################################################
-#
-# 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.1 (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.
-#
-##############################################################################
-"""
-$Id$
-"""
-
-import warnings
-
-warnings.warn("This module is deprecated and will go away in Zope 3.5.",
-              DeprecationWarning, 2)
-
-from zope.component.interfaces import IContextDependent
-from zope.interface import implements
-
-class ContextDependent(object):
-    """standard boilerplate for context dependent objects"""
-
-    implements(IContextDependent)
-
-    def __init__(self, context):
-        self.context = context

Deleted: zope.component/trunk/src/zope/component/exceptions.py
===================================================================
--- zope.component/trunk/src/zope/component/exceptions.py	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/exceptions.py	2009-03-02 16:01:59 UTC (rev 97420)
@@ -1,30 +0,0 @@
-##############################################################################
-#
-# 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.1 (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.
-#
-##############################################################################
-"""
-$Id$
-"""
-
-import warnings
-
-warnings.warn("This module is deprecated and will go away in Zope 3.5. "
-              "Use zope.component.interfaces instead.",
-              DeprecationWarning, 2)
-
-from zope.component.interfaces import ComponentLookupError
-from zope.component.interfaces import Invalid, Misused
-
-
-__all__ = ["ComponentLookupError",
-           "Invalid",
-           "Misused"]

Modified: zope.component/trunk/src/zope/component/factory.py
===================================================================
--- zope.component/trunk/src/zope/component/factory.py	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/factory.py	2009-03-02 16:01:59 UTC (rev 97420)
@@ -44,4 +44,4 @@
         return implementedBy(self._callable)
 
     def __repr__(self):
-        return '<%s for %s>' %(self.__class__.__name__, `self._callable`)
+        return '<%s for %s>' % (self.__class__.__name__, repr(self._callable))

Modified: zope.component/trunk/src/zope/component/factory.txt
===================================================================
--- zope.component/trunk/src/zope/component/factory.txt	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/factory.txt	2009-03-02 16:01:59 UTC (rev 97420)
@@ -1,4 +1,3 @@
-=========
 Factories
 =========
 
@@ -27,7 +26,7 @@
   >>> factory3 = Factory(lambda x: x, 'Func', 'Function', (IFunction,))
 
 Calling a Factory
-+++++++++++++++++
+~~~~~~~~~~~~~~~~~
 
 Here we test whether the factory correctly creates the objects and
 including the correct handling of constructor elements.
@@ -59,7 +58,7 @@
 
 
 Title and Description
-+++++++++++++++++++++
+~~~~~~~~~~~~~~~~~~~~~
 
   >>> factory.title
   'Klass'
@@ -76,7 +75,7 @@
 
 
 Provided Interfaces
-+++++++++++++++++++
+~~~~~~~~~~~~~~~~~~~
 
   >>> implemented = factory.getInterfaces()
   >>> implemented.isOrExtends(IKlass)
@@ -93,7 +92,7 @@
   [<InterfaceClass __builtin__.IFunction>]
 
 
-The Componant Architecture Factory API
+The Component Architecture Factory API
 --------------------------------------
 
   >>> import zope.component
@@ -104,7 +103,7 @@
   >>> gsm.registerUtility(factory, IFactory, 'klass')
 
 Creating an Object
-++++++++++++++++++
+~~~~~~~~~~~~~~~~~~
 
   >>> kl = zope.component.createObject('klass', 1, 2, foo=3, bar=4)
   >>> isinstance(kl, Klass)
@@ -115,7 +114,7 @@
   {'foo': 3, 'bar': 4}
 
 Accessing Provided Interfaces
-+++++++++++++++++++++++++++++
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
   >>> implemented = zope.component.getFactoryInterfaces('klass')
   >>> implemented.isOrExtends(IKlass)
@@ -124,7 +123,7 @@
   [<InterfaceClass __builtin__.IKlass>]
 
 List of All Factories
-+++++++++++++++++++++
+~~~~~~~~~~~~~~~~~~~~~
 
   >>> [(name, fac.__class__) for name, fac in
   ...  zope.component.getFactoriesFor(IKlass)]

Modified: zope.component/trunk/src/zope/component/globalregistry.py
===================================================================
--- zope.component/trunk/src/zope/component/globalregistry.py	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/globalregistry.py	2009-03-02 16:01:59 UTC (rev 97420)
@@ -17,7 +17,6 @@
 """
 from zope.interface import implements
 from zope.interface.adapter import AdapterRegistry
-from zope.deprecation.deprecation import deprecate
 from zope.component.registry import Components
 from zope.component.interfaces import Invalid, IComponentLookup, IRegistry
 from zope.component.interfaces import ComponentLookupError
@@ -39,50 +38,7 @@
     def __reduce__(self):
         return GAR, (self.__parent__, self.__name__)
 
-########################################################################
-#
-# BBB 2006/02/28 -- to be removed after 12 months
-
-class _IGlobalSiteManager(IComponentLookup, IRegistry):
-
-    def provideAdapter(required, provided, name, factory, info=''):
-        """Register an adapter factory
-
-        :Parameters:
-          - `required`: a sequence of specifications for objects to be
-             adapted.
-          - `provided`: The interface provided by the adapter
-          - `name`: The adapter name
-          - `factory`: The object used to compute the adapter
-          - `info`: Provide some info about this particular adapter.
-        """
-
-    def subscribe(required, provided, factory, info=''):
-        """Register a subscriber factory
-
-        :Parameters:
-          - `required`: a sequence of specifications for objects to be
-             adapted.
-          - `provided`: The interface provided by the adapter
-          - `name`: The adapter name
-          - `factory`: The object used to compute the subscriber
-          - `info`: Provide some info about this particular adapter.
-        """
-
-    def provideUtility(providedInterface, component, name='', info='',
-                       strict=True):
-        """Register a utility
-
-        If strict is true, then the specified component *must* implement the
-        `providedInterface`. Turning strict off is particularly useful for
-        tests."""
-
-#
-########################################################################
-
-
 class BaseGlobalComponents(Components):
-    implements(_IGlobalSiteManager)
 
     def _init_registries(self):
         self.adapters = GlobalAdapterRegistry(self, 'adapters')
@@ -92,50 +48,6 @@
         # Global site managers are pickled as global objects
         return self.__name__
 
-    ####################################################################
-    #
-    # BBB 2006/02/28 -- to be removed after 12 months
-
-    @deprecate("The provideAdapter method of the global site manager has been "
-               "deprecated. Use registerAdapter instead.")
-    def provideAdapter(self, required, provided, name, factory, info=''):
-        self.registerAdapter(factory, required, provided, name, info)
-
-    @deprecate("The subscribe method of the global site manager has been "
-               "deprecated. Use registerHandler or registerSubscriptionAdapter "
-               "instead.")
-    def subscribe(self, required, provided, factory, info=''):
-        if provided is None:
-            self.registerHandler(factory, required, u'', info)
-        else:
-            self.registerSubscriptionAdapter(factory, required, provided,
-                                             info=info)
-
-    @deprecate("The provideUtility method of the global site manager has been "
-               "deprecated. Use registerUtility instead.")
-    def provideUtility(self, providedInterface, component, name='', info='',
-                       strict=True):
-        if strict and not providedInterface.providedBy(component):
-            raise Invalid("The registered component doesn't provide "
-                          "the promised interface.")
-
-        self.registerUtility(component, providedInterface, name, info)
-
-    @deprecate("The registrations method of the global site manager has been "
-               "deprecate. Use either registeredAdapters, registeredUtilities, "
-               "or registeredSubscriptionAdapters instead.")
-    def registrations(self):
-        for reg in self.registeredAdapters():
-            yield reg
-        for reg in self.registeredSubscriptionAdapters():
-            yield reg
-        for reg in self.registeredHandlers():
-            yield reg
-        for reg in self.registeredUtilities():
-            yield reg
-    #
-    ####################################################################
-
 base = BaseGlobalComponents('base')
 
 try:

Modified: zope.component/trunk/src/zope/component/interfaces.py
===================================================================
--- zope.component/trunk/src/zope/component/interfaces.py	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/interfaces.py	2009-03-02 16:01:59 UTC (rev 97420)
@@ -45,10 +45,6 @@
 class ObjectEvent(object):
     interface.implements(IObjectEvent)
 
-    # for repr backward compatibility. In the next release cycle, we'll
-    # provide a testing framework that addresses repr migration.
-    __module__ = 'zope.app.event.objectevent'
-
     def __init__(self, object):
         self.object = object
 
@@ -379,11 +375,6 @@
         returned.
         """
 
-zope.deferredimport.deprecated(
-    "Use IComponentLookup instead.  ISiteManager will be removed in 2007.",
-    ISiteManager = "zope.component.interfaces:IComponentLookup",
-    )
-
 class IComponentRegistrationConvenience(interface.Interface):
     """API for registering components.
 

Modified: zope.component/trunk/src/zope/component/persistentregistry.py
===================================================================
--- zope.component/trunk/src/zope/component/persistentregistry.py	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/persistentregistry.py	2009-03-02 16:01:59 UTC (rev 97420)
@@ -54,5 +54,3 @@
         self._adapter_registrations = persistent.mapping.PersistentMapping()
         self._subscription_registrations = persistent.list.PersistentList()
         self._handler_registrations = persistent.list.PersistentList()
-
-    

Modified: zope.component/trunk/src/zope/component/persistentregistry.txt
===================================================================
--- zope.component/trunk/src/zope/component/persistentregistry.txt	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/persistentregistry.txt	2009-03-02 16:01:59 UTC (rev 97420)
@@ -3,4 +3,4 @@
 
 Persistent component management allows persistent management of
 components.  From a usage point of view, there shouldn't be any new
-behavior beyond what's described in components.txt.
+behavior beyond what's described in registry.txt.

Modified: zope.component/trunk/src/zope/component/registry.py
===================================================================
--- zope.component/trunk/src/zope/component/registry.py	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/registry.py	2009-03-02 16:01:59 UTC (rev 97420)
@@ -17,7 +17,6 @@
 """
 
 import types
-import zope.deprecation
 import zope.interface.adapter
 from zope import component, interface
 from zope.component import interfaces
@@ -446,29 +445,6 @@
     def __cmp__(self, other):
         return cmp(self.__repr__(), other.__repr__())
 
-    # this may actually not be needed as component did not exist as
-    # an attribute in Zope 3.2, but we'll leave it in to be sure.
-    @property
-    @zope.deprecation.deprecate(
-        "The component attribute on adapter registrations will be unsupported "
-        "in Zope 3.5. Use the factory attribute instead.")
-    def component(self):
-        return self.factory
-
-    @property
-    @zope.deprecation.deprecate(
-        "The value attribute on adapter registrations will be unsupported "
-        "in Zope 3.5. Use the factory attribute instead.")
-    def value(self):
-        return self.factory
-
-    @property
-    @zope.deprecation.deprecate(
-        "The doc attribute on adapter registrations will be unsupported "
-        "in Zope 3.5. Use the info attribute instead.")
-    def doc(self):
-        return self.info
-    
 class SubscriptionRegistration(AdapterRegistration):
 
     interface.implementsOnly(interfaces.ISubscriptionAdapterRegistration)
@@ -516,5 +492,3 @@
                    interfaces.IRegistrationEvent)
 def dispatchHandlerRegistrationEvent(registration, event):
     component.handle(registration.handler, event)
-
-

Deleted: zope.component/trunk/src/zope/component/service.py
===================================================================
--- zope.component/trunk/src/zope/component/service.py	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/service.py	2009-03-02 16:01:59 UTC (rev 97420)
@@ -1,178 +0,0 @@
-##############################################################################
-#
-# 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.1 (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.
-#
-##############################################################################
-"""
-$Id$
-"""
-import warnings
-
-warnings.warn("This module is deprecated and will go away in Zope 3.5.",
-              DeprecationWarning, 2)
-
-import zope.component
-from zope.exceptions import DuplicationError
-from zope.component.bbb.interfaces import IServiceService
-from zope.interface import implements, Interface, directlyProvides
-
-
-class IGlobalServiceManager(IServiceService):
-
-    def defineService(name, interface):
-        """Define a new service of the given name implementing the given
-        interface.  If the name already exists, raises
-        DuplicationError"""
-
-    def provideService(name, component):
-        """Register a service component.
-
-        Provide a service component to do the work of the named
-        service.  If a service component has already been assigned to
-        this name, raise DuplicationError; if the name has not been
-        defined, raises UndefinedService; if the component does not
-        implement the registered interface for the service name,
-        raises InvalidService.
-
-        """
-
-class IService(Interface):
-    """Marker interface that is used as utility interface to simulate
-       services."""
-
-class IServiceDefinition(Interface):
-    """Marker interface that is used as utility interface to store service
-    defintions (name, interface)."""
-
-class UndefinedService(Exception):
-    """An attempt to register a service that has not been defined
-    """
-
-class InvalidService(Exception):
-    """An attempt to register a service that doesn't implement
-       the required interface
-    """
-
-__warn__ = True
-class GlobalServiceManager(object):
-    """service manager"""
-
-    implements(IGlobalServiceManager)
-
-    def __init__(self, name=None, module=None, sitemanager=None):
-        if __warn__:
-            warnings.warn(
-                "The concept of services has been deprecated. You now have "
-                "only adapters and utilities, which are managed by the site "
-                "manager, which is probably the object you want.",
-                DeprecationWarning, 2)
-        if sitemanager is None:
-            from zope.component.globalregistry import BaseGlobalComponents
-            sitemanager = BaseGlobalComponents()
-        self.sm = sitemanager
-        self.__name__ = name
-        self.__module__ = module
-
-    def _clear(self):
-        pass
-
-    def __reduce__(self):
-        # Global service managers are pickled as global objects
-        return self.__name__
-
-    def defineService(self, name, interface):
-        """see IGlobalServiceManager interface"""
-
-        utils = self.sm.getAllUtilitiesRegisteredFor(IServiceDefinition)
-        names = [n for n, iface in utils]
-        if name in names:
-            raise DuplicationError(name)
-
-        self.sm.provideUtility(IServiceDefinition, (name, interface),
-                                name=name, strict=False)
-
-    def getServiceDefinitions(self):
-        """see IServiceService Interface"""
-        defs = list(self.sm.getAllUtilitiesRegisteredFor(IServiceDefinition))
-        return defs + [('Services', IServiceService)]
-
-    def provideService(self, name, component, force=False):
-        """see IGlobalServiceManager interface, above
-
-        The force keyword allows one to replace an existing
-        service.  This is mostly useful in testing scenarios.
-        """
-
-        if not force and self.sm.queryUtility(IService, name) is not None:
-            raise DuplicationError(name)
-
-        utils = self.sm.getAllUtilitiesRegisteredFor(IServiceDefinition)
-        if name not in [name for name, iface in utils]:
-            raise UndefinedService(name)
-
-        if not dict(self.getServiceDefinitions())[name].providedBy(component):
-            raise InvalidService(name, component,
-                                 dict(self.getServiceDefinitions())[name])
-
-        if isinstance(component, GlobalService):
-            component.__parent__ = self
-            component.__name__ = name
-
-        # Ignore the base services, since their functionality is provided by
-        # the SM.
-        if name in ('Adapters', 'Utilities', 'Services'):
-            return
-
-        directlyProvides(component, IService)
-        self.sm.provideUtility(IService, component, name)
-
-    def getService(self, name):
-        """see IServiceService interface"""
-        if name == 'Services':
-            return self
-
-        if name == 'Adapters':
-            from zope.component.bbb.adapter import GlobalAdapterService
-            return GlobalAdapterService(self.sm)
-
-        if name == 'Utilities':
-            from zope.component.bbb.utility import GlobalUtilityService
-            return GlobalUtilityService(self.sm)
-
-        service = self.sm.queryUtility(IService, name)
-        if service is None:
-            from zope.component.bbb.exceptions import ComponentLookupError
-            raise ComponentLookupError(name)
-
-        return service
-
-
-def GS(service_manager, service_name):
-    return service_manager.getService(service_name)
-
-class GlobalService(object):
-
-    def __reduce__(self):
-        return GS, (self.__parent__, self.__name__)
-
-
-def __getSM(sitemanager=None):
-    return GlobalServiceManager('serviceManager', __name__, sitemanager)
-
-def defineService(name, interface, sitemanager=None):
-    if sitemanager is None:
-        from zope.component.globalregistry import base
-    __getSM(base).defineService(name, interface)
-
-
-__warn__ = False
-serviceManager = GlobalServiceManager('serviceManager', __name__)
-__warn__ = True

Deleted: zope.component/trunk/src/zope/component/servicenames.py
===================================================================
--- zope.component/trunk/src/zope/component/servicenames.py	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/servicenames.py	2009-03-02 16:01:59 UTC (rev 97420)
@@ -1,24 +0,0 @@
-##############################################################################
-#
-# 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.1 (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.
-#
-##############################################################################
-"""
-$Id$
-"""
-import warnings
-
-warnings.warn("This module is deprecated and will go away in Zope 3.5.",
-              DeprecationWarning, 2)
-
-Adapters = 'Adapters'
-Utilities = 'Utilities'
-Services = 'Services'

Deleted: zope.component/trunk/src/zope/component/site.py
===================================================================
--- zope.component/trunk/src/zope/component/site.py	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/site.py	2009-03-02 16:01:59 UTC (rev 97420)
@@ -1,39 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2004 Zope Corporation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (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.
-#
-##############################################################################
-"""Global Site Manager
-
-This module has been deprecated and will be removed.  Most of the
-functionality now resides in the zope.component.globalregistry module.
-
-$Id$
-"""
-__docformat__ = "reStructuredText"
-
-import warnings
-warnings.warn("The zope.component.site module has been deprecated and "
-              "will be removed.  The functionality now resides "
-              "in the zope.component.globalregistry "
-              "and zope.component.registry modules.",
-              DeprecationWarning, stacklevel=2)
-
-from zope.component.registry import Components as SiteManager
-from zope.component.registry import AdapterRegistration
-from zope.component.registry import SubscriptionRegistration
-from zope.component.registry import UtilityRegistration
-from zope.component.globalregistry import BaseGlobalComponents \
-     as GlobalSiteManager
-from zope.component.globalregistry import base as globalSiteManager
-from zope.component.globalregistry import GAR
-from zope.component.globalregistry \
-     import _IGlobalSiteManager as IGlobalSiteManager

Modified: zope.component/trunk/src/zope/component/socketexample.txt
===================================================================
--- zope.component/trunk/src/zope/component/socketexample.txt	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/socketexample.txt	2009-03-02 16:01:59 UTC (rev 97420)
@@ -1,4 +1,3 @@
-==================================================
 The Zope 3 Component Architecture (Socket Example)
 ==================================================
 
@@ -75,7 +74,7 @@
 
 
 Single Adapters
-+++++++++++++++
+~~~~~~~~~~~~~~~
 
 Before we can use the adapter, we have to buy it and make it part of our
 inventory. In the component architecture we do this by registering the adapter
@@ -142,7 +141,7 @@
 
 
 Named Adapters
-++++++++++++++
+~~~~~~~~~~~~~~
 
 You are finally back in Germany. You also brought your DVD player and a couple
 DVDs with you, which you would like to watch. Your shaver was able to convert
@@ -204,7 +203,7 @@
 
 
 Multi-Adapters
-++++++++++++++
+~~~~~~~~~~~~~~
 
 After watching all the DVDs you brought at least twice, you get tired of them
 and you want to listen to some music using your MP3 player. But darn, the MP3
@@ -408,7 +407,7 @@
 
 
 Named Utilities
-+++++++++++++++
+~~~~~~~~~~~~~~~
 
 It is often desirable to have several utilities providing the same interface
 per site. This way you can implement any sort of registry using utilities. For
@@ -475,7 +474,7 @@
 
 
 Factories
-+++++++++
+~~~~~~~~~
 
 A *factory* is a special kind of utility that exists to create other
 components. A factory is always identified by a name. It also provides a title
@@ -596,5 +595,3 @@
 
 The site manager instance `lsm` is formally known as a *local site manager* of
 `context`.
-
-

Deleted: zope.component/trunk/src/zope/component/utility.py
===================================================================
--- zope.component/trunk/src/zope/component/utility.py	2009-03-02 16:01:36 UTC (rev 97419)
+++ zope.component/trunk/src/zope/component/utility.py	2009-03-02 16:01:59 UTC (rev 97420)
@@ -1,76 +0,0 @@
-##############################################################################
-#
-# 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.1 (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.
-#
-##############################################################################
-"""
-$Id$
-"""
-import warnings
-
-warnings.warn("This module is deprecated and will go away in Zope 3.5.",
-              DeprecationWarning, 2)
-
-from zope.component.interfaces import Invalid, ComponentLookupError, IRegistry
-from zope.component.bbb.interfaces import IUtilityService
-from zope.component.service import GlobalService, IService, IServiceDefinition
-from zope.component.registry import UtilityRegistration
-import zope.interface
-
-class IGlobalUtilityService(IUtilityService, IRegistry):
-
-    def provideUtility(providedInterface, component, name='', info=''):
-        """Provide a utility
-
-        A utility is a component that provides an interface.
-        """
-
-class UtilityService(object):
-    """Provide IUtilityService
-
-    Mixin that superimposes utility management on adapter registery
-    implementation
-    """
-
-    def __init__(self, sitemanager=None):
-        self.__parent__ = None
-        if sitemanager is None:
-            from zope.component.site import GlobalSiteManager
-            sitemanager = GlobalSiteManager()
-        self.sm = sitemanager
-
-    def __getattr__(self, name):
-        attr = getattr(self.sm, name)
-        if attr is not None:
-            return attr
-
-        attr = getattr(self.sm.utilities, name)
-        if attr is not None:
-            return attr
-
-        raise AttributeError(name)
-
-
-class GlobalUtilityService(UtilityService, GlobalService):
-
-    zope.interface.implementsOnly(IGlobalUtilityService)
-
-    def __init__(self, sitemanager=None):
-        super(GlobalUtilityService, self).__init__(sitemanager)
-
-    def provideUtility(self, providedInterface, component, name='', info=''):
-        self.sm.provideUtility(providedInterface, component, name, info)
-
-    def registrations(self):
-        for reg in self.sm.registrations():
-            if isinstance(reg, UtilityRegistration):
-                if not reg.provided in (IService, IServiceDefinition): 
-                    yield reg



More information about the Checkins mailing list