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

Jim Fulton jim at zope.com
Mon Mar 15 15:42:30 EST 2004


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

Modified Files:
	config.py 
Log Message:
Updated to reflect changes in the adapter-registry api.


=== Zope3/src/zope/configuration/config.py 1.23 => 1.24 ===
--- Zope3/src/zope/configuration/config.py:1.23	Wed Mar 10 07:24:02 2004
+++ Zope3/src/zope/configuration/config.py	Mon Mar 15 15:42:30 2004
@@ -29,7 +29,7 @@
 from zope.configuration.interfaces import IConfigurationContext
 from zope.configuration.interfaces import IGroupingContext
 from zope.interface.adapter import AdapterRegistry
-from zope.interface import Interface, implements, directlyProvides
+from zope.interface import Interface, implements, directlyProvides, providedBy
 from zope.interface.interfaces import IInterface
 from zope.schema.errornames import WrongType
 from zope.configuration import fields
@@ -399,7 +399,7 @@
             r = AdapterRegistry()
             self._registry[name] = r
 
-        r.provideAdapter(interface, Interface, factory)
+        r.register([interface], Interface, '', factory)
 
     def document(self, name, schema, usedIn, info, parent=None):
         if isinstance(name, (str, unicode)):
@@ -415,7 +415,7 @@
             if r is None:
                 raise ConfigurationError("Unknown directive", ns, n)
 
-        f = r.queryAdapter(context, Interface, raw=True)
+        f = r.lookup1(providedBy(context), Interface)
         if f is None:
             raise ConfigurationError(
                 "The directive %s cannot be used in this context" % (name, ))




More information about the Zope3-Checkins mailing list