[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/component/globalregistry.py Use registerHandler for subscribers, not registerSubscriptionAdapter

Philipp von Weitershausen philikon at philikon.de
Tue Feb 28 11:15:49 EST 2006


Log message for revision 65593:
  Use registerHandler for subscribers, not registerSubscriptionAdapter
  

Changed:
  U   Zope3/branches/jim-adapter/src/zope/component/globalregistry.py

-=-
Modified: Zope3/branches/jim-adapter/src/zope/component/globalregistry.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/component/globalregistry.py	2006-02-28 16:14:09 UTC (rev 65592)
+++ Zope3/branches/jim-adapter/src/zope/component/globalregistry.py	2006-02-28 16:15:49 UTC (rev 65593)
@@ -113,10 +113,11 @@
         self.registerAdapter(factory, required, provided, name, info)
 
     @deprecate("The subscribe method of the global site manager has been "
-               "deprecated. Use registerSubscriptionAdapter instead.")
+               "deprecated. Use registerHandler instead.")
     def subscribe(self, required, provided, factory, info=''):
-        self.registerSubscriptionAdapter(factory, required, provided,
-                                         u'', info)
+        # we're discarding 'provided' here, but a subscriber doesn't
+        # need that anyway
+        self.registerHandler(factory, required, u'', info)
 
     @deprecate("The provideUtility method of the global site manager has been "
                "deprecated. Use registerUtility instead.")



More information about the Zope3-Checkins mailing list