[Zope-CVS] CVS: Products/PluginRegistry - CHANGES.txt:1.4 PluginRegistry.py:1.3 version.txt:1.3

Tres Seaver tseaver at palladion.com
Tue Sep 6 18:00:19 EDT 2005


Update of /cvs-repository/Products/PluginRegistry
In directory cvs.zope.org:/tmp/cvs-serv31486

Modified Files:
	CHANGES.txt PluginRegistry.py version.txt 
Log Message:


  - Removed deprecation warnings under Zope 2.8.x.


=== Products/PluginRegistry/CHANGES.txt 1.3 => 1.4 ===
--- Products/PluginRegistry/CHANGES.txt:1.3	Tue Aug 30 12:02:05 2005
+++ Products/PluginRegistry/CHANGES.txt	Tue Sep  6 17:59:48 2005
@@ -1,6 +1,10 @@
 PluginRegistry Product Changelog
 ================================
 
+  After PluginRegistry-1.0.2
+
+    - Removed deprecation warnings under Zope 2.8.x.
+
   PluginRegistry-1.0.2 (2005/08/30)
 
     - CVS tag, 'PluginRegistry-1_0_2'.


=== Products/PluginRegistry/PluginRegistry.py 1.2 => 1.3 ===
--- Products/PluginRegistry/PluginRegistry.py:1.2	Wed Apr 28 15:36:18 2004
+++ Products/PluginRegistry/PluginRegistry.py	Tue Sep  6 17:59:48 2005
@@ -122,7 +122,11 @@
         parent = aq_parent( aq_inner( self ) )
         plugin = parent._getOb( plugin_id ) 
 
-        if not plugin_type.isImplementedBy(plugin):
+        satisfies = getattr(plugin_type, 'providedBy', None)
+        if satisfies is None:
+            satisfies = plugin_type.isImplementedBy
+
+        if not satisfies(plugin):
             raise ValueError, 'Plugin does not implement %s' % plugin_type 
         
         plugins.append( plugin_id )
@@ -271,8 +275,12 @@
         active = self._getPlugins( interface )
         available = []
 
+        satisfies = getattr(interface, 'providedBy', None)
+        if satisfies is None:
+            satisfies = interface.isImplementedBy
+
         for id, value in aq_parent( aq_inner( self ) ).objectItems():
-            if interface.isImplementedBy( value ):
+            if satisfies( value ):
                 if id not in active:
                     available.append( id )
 


=== Products/PluginRegistry/version.txt 1.2 => 1.3 ===
--- Products/PluginRegistry/version.txt:1.2	Tue Aug 30 12:01:47 2005
+++ Products/PluginRegistry/version.txt	Tue Sep  6 17:59:48 2005
@@ -1 +1 @@
-PluginRegistry-1_0_2
+PluginRegistry-1_0_2+



More information about the Zope-CVS mailing list