[Zope3-checkins]
SVN: Zope3/branches/jim-adapter/src/zope/component/
Removed some untested code. Made IGlobalSiteManager private.
Jim Fulton
jim at zope.com
Sun Apr 2 13:00:10 EDT 2006
Log message for revision 66322:
Removed some untested code. Made IGlobalSiteManager private.
Updated to reflect that base registries now implements __name__.
Changed:
U Zope3/branches/jim-adapter/src/zope/component/globalregistry.py
U Zope3/branches/jim-adapter/src/zope/component/site.py
-=-
Modified: Zope3/branches/jim-adapter/src/zope/component/globalregistry.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/component/globalregistry.py 2006-04-02 17:00:08 UTC (rev 66321)
+++ Zope3/branches/jim-adapter/src/zope/component/globalregistry.py 2006-04-02 17:00:10 UTC (rev 66322)
@@ -40,14 +40,11 @@
def __reduce__(self):
return GAR, (self.__parent__, self.__name__)
-def NGC(components, registryName):
- return components.getUtility(IComponents, registryName)
-
########################################################################
#
# BBB 2006/02/28 -- to be removed after 12 months
-class IGlobalSiteManager(IComponentLookup, IRegistry):
+class _IGlobalSiteManager(IComponentLookup, IRegistry):
def provideAdapter(required, provided, name, factory, info=''):
"""Register an adapter factory
@@ -81,20 +78,13 @@
`providedInterface`. Turning strict off is particularly useful for
tests."""
-deprecated("IGlobalSiteManager", "The IGlobalSiteManager interface has been "
- "deprecated and will be removed. Use the zope.component.interfaces."
- "IComponents instead")
#
########################################################################
class BaseGlobalComponents(Components):
- implements(IGlobalSiteManager)
+ implements(_IGlobalSiteManager)
- def __init__(self, name=''):
- self.__name__ = name
- super(BaseGlobalComponents, self).__init__()
-
def _init_registries(self):
self.adapters = GlobalAdapterRegistry(self, 'adapters')
self.utilities = GlobalAdapterRegistry(self, 'utilities')
@@ -151,13 +141,3 @@
from zope.testing.cleanup import addCleanUp
addCleanUp(lambda: base.__init__('base'))
del addCleanUp
-
-
-class NamedGlobalComponents(BaseGlobalComponents):
-
- def __init__(self, parent, name):
- self.__parent__ = parent
- super(NamedGlobalComponents, self).__init__(name)
-
- def __reduce__(self):
- return NGC, (self.__parent__, self.__name__)
Modified: Zope3/branches/jim-adapter/src/zope/component/site.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/component/site.py 2006-04-02 17:00:08 UTC (rev 66321)
+++ Zope3/branches/jim-adapter/src/zope/component/site.py 2006-04-02 17:00:10 UTC (rev 66322)
@@ -33,4 +33,5 @@
from zope.component.globalregistry import BaseGlobalComponents \
as GlobalSiteManager
from zope.component.globalregistry import base as globalSiteManager
-from zope.component.globalregistry import IGlobalSiteManager
+from zope.component.globalregistry \
+ import _IGlobalSiteManager as IGlobalSiteManager
More information about the Zope3-Checkins
mailing list