[Zope3-checkins] CVS: Zope3/src/zope/app/services - adapter.py:1.25
presentation.py:1.8 surrogate.py:1.5
Jim Fulton
jim at zope.com
Mon Mar 8 12:27:25 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/services
In directory cvs.zope.org:/tmp/cvs-serv4511/src/zope/app/services
Modified Files:
adapter.py presentation.py surrogate.py
Log Message:
Removed the old adapter registry code.
Renamed the surrogate registry to AdapterRegistry and moved the
surrogate code to zope.interface.adapter.
Removed the old surrogate module.
=== Zope3/src/zope/app/services/adapter.py 1.24 => 1.25 ===
--- Zope3/src/zope/app/services/adapter.py:1.24 Fri Feb 20 11:57:30 2004
+++ Zope3/src/zope/app/services/adapter.py Mon Mar 8 12:26:54 2004
@@ -29,7 +29,6 @@
import zope.interface
import zope.schema
-
class LocalAdapterService(
zope.app.services.surrogate.LocalSurrogateRegistry,
zope.app.services.surrogate.LocalSurrogateBasedService,
@@ -119,7 +118,7 @@
#BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
import persistent
-from zope.interface.surrogate import ReadProperty
+from zope.interface.adapter import ReadProperty
AdapterRegistration.required = ReadProperty(lambda self: self.forInterface)
AdapterRegistration.provided = ReadProperty(
=== Zope3/src/zope/app/services/presentation.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/services/presentation.py:1.7 Sat Mar 6 12:48:53 2004
+++ Zope3/src/zope/app/services/presentation.py Mon Mar 8 12:26:55 2004
@@ -552,7 +552,7 @@
from zope.app.event.function import Subscriber
import persistent
import sys
-from zope.interface.surrogate import ReadProperty
+from zope.interface.adapter import ReadProperty
ViewRegistration.required = ReadProperty(lambda self: self.forInterface)
ViewRegistration.factoryName = ReadProperty(lambda self: self.class_)
=== Zope3/src/zope/app/services/surrogate.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/services/surrogate.py:1.4 Fri Feb 20 11:57:30 2004
+++ Zope3/src/zope/app/services/surrogate.py Mon Mar 8 12:26:55 2004
@@ -18,8 +18,8 @@
from persistent import Persistent
from persistent.dict import PersistentDict
-from zope.interface.surrogate import Surrogate, SurrogateRegistry
-from zope.interface.surrogate import adapterImplied, Default
+from zope.interface.adapter import Surrogate, AdapterRegistry
+from zope.interface.adapter import adapterImplied, Default
from zope.app.services.registration import NotifyingRegistrationStack
import zope.app.component.nextservice
import zope.app.container.contained
@@ -52,7 +52,7 @@
self.adapters = adapters
Surrogate.clean(self)
-class LocalSurrogateRegistry(SurrogateRegistry, Persistent):
+class LocalSurrogateRegistry(AdapterRegistry, Persistent):
"""Local/persistent surrogate registry
"""
@@ -68,7 +68,7 @@
self.base = base
self.adapters = {}
self.stacks = PersistentDict()
- SurrogateRegistry.__init__(self)
+ AdapterRegistry.__init__(self)
self.setNext(next)
def setNext(self, next, base=None):
@@ -96,7 +96,7 @@
def __setstate__(self, state):
Persistent.__setstate__(self, state)
- SurrogateRegistry.__init__(self)
+ AdapterRegistry.__init__(self)
def baseFor(self, spec):
return self.base.get(spec)
More information about the Zope3-Checkins
mailing list