[Zope-Checkins] CVS: Zope/lib/python/Interface - iclass.py:1.14.2.1 _Element.py:1.3.6.1

Anthony Baxter anthony@interlink.com.au
Fri, 25 Jul 2003 09:38:15 -0400


Update of /cvs-repository/Zope/lib/python/Interface
In directory cvs.zope.org:/tmp/cvs-serv27640

Modified Files:
      Tag: Zope-2_6-branch
	_Element.py 
Added Files:
      Tag: Zope-2_6-branch
	iclass.py 
Log Message:
Make ZClasses that subclass ObjectManager work again under 2.6. Will 
also check this into the trunk.


=== Added File Zope/lib/python/Interface/iclass.py ===
import warnings
warnings.warn("""\
The Interface.iclass module is no more. 
This is a stub module to allow ZClasses that subclass ObjectManager 
to continue to function - please fix your ZClasses (using the 'Subobjects' 
tab)""", 
DeprecationWarning)
# Old interface object. Provided for backwards compatibility - allows ZClasses
# that subclass ObjectManager to be used in 2.6.
class Interface:
    def __init__(self, *args, **kwargs):
       pass



=== Zope/lib/python/Interface/_Element.py 1.3 => 1.3.6.1 ===
--- Zope/lib/python/Interface/_Element.py:1.3	Wed Aug 14 17:35:32 2002
+++ Zope/lib/python/Interface/_Element.py	Fri Jul 25 09:38:07 2003
@@ -28,10 +28,10 @@
 
     __tagged_values = {}
 
-    def __init__(self, __name__, __doc__=''):
+    def __init__(self, __name__=None, __doc__=''):
         """Create an 'attribute' description
         """
-        if not __doc__ and __name__.find(' ') >= 0:
+        if not __doc__ and __name__ and __name__.find(' ') >= 0:
             __doc__ = __name__
             __name__ = None