[Zope-Checkins] CVS: Zope/lib/python/Interface - iclass.py:1.15 _Element.py:1.4
Anthony Baxter
anthony@interlink.com.au
Fri, 25 Jul 2003 09:48:39 -0400
Update of /cvs-repository/Zope/lib/python/Interface
In directory cvs.zope.org:/tmp/cvs-serv29370
Modified Files:
_Element.py
Added Files:
iclass.py
Log Message:
Make ZClasses that subclass ObjectManager (created in Zope2.5 and earlier)
work again.
=== Zope/lib/python/Interface/iclass.py 1.14 => 1.15 ===
--- /dev/null Fri Jul 25 09:48:38 2003
+++ Zope/lib/python/Interface/iclass.py Fri Jul 25 09:48:34 2003
@@ -0,0 +1,13 @@
+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.4 ===
--- 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:48:34 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