[Zope3-checkins] CVS: Zope3/src/zope/configuration - config.py:1.21

Jim Fulton jim at zope.com
Mon Mar 8 12:26:59 EST 2004


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

Modified Files:
	config.py 
Log Message:
Change to use the new adapter registry (formerly known as a surrigate
registry).


=== Zope3/src/zope/configuration/config.py 1.20 => 1.21 ===
--- Zope3/src/zope/configuration/config.py:1.20	Fri Mar  5 17:09:25 2004
+++ Zope3/src/zope/configuration/config.py	Mon Mar  8 12:26:59 2004
@@ -382,7 +382,8 @@
     def __init__(self):
         super(ConfigurationAdapterRegistry, self).__init__()
         self._registry = {}
-        # Stores tuples of form: (namespace, name), schema, usedIn, info, parent
+        # Stores tuples of form:
+        #   (namespace, name), schema, usedIn, info, parent
         self._docRegistry = []
 
     def register(self, interface, name, factory):
@@ -391,7 +392,7 @@
             r = AdapterRegistry()
             self._registry[name] = r
 
-        r.register(interface, Interface, factory)
+        r.provideAdapter(interface, Interface, factory)
 
     def document(self, name, schema, usedIn, info, parent=None):
         if isinstance(name, (str, unicode)):
@@ -407,7 +408,7 @@
             if r is None:
                 raise ConfigurationError("Unknown directive", ns, n)
 
-        f = r.getForObject(context, Interface)
+        f = r.queryAdapter(context, Interface, raw=True)
         if f is None:
             raise ConfigurationError(
                 "The directive %s cannot be used in this context" % (name, ))




More information about the Zope3-Checkins mailing list