[Zope-Coders] 2.5 -> 2.6 ZClass/Objectmanager breakage
Anthony Baxter
Anthony Baxter <anthony@interlink.com.au>
Fri, 25 Jul 2003 18:44:10 +1000
>>> Chris McDonough wrote
> I say go for it. ;-)
The following patch makes stuff happy for me. I'm happy to check
it in if someone wants to give a yea/nay. Looking in the mailing
list archives, this is something that's bitten quite a number of
people, so I think there's value to putting it back in. (Possibly
with a couple of DeprecationWarnings if necessary).
Index: Interface/_Element.py
===================================================================
RCS file: /export/00/cvsroot/Zope/lib/python/Interface/_Element.py,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 _Element.py
--- Interface/_Element.py 2003/07/24 08:35:30 1.1.1.1
+++ Interface/_Element.py 2003/07/25 08:42:03
@@ -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
Index: Interface/iclass.py
===================================================================
RCS file: iclass.py
diff -N iclass.py
--- /dev/null Fri Jul 25 08:10:52 2003
+++ iclass.py Fri Jul 25 08:42:03 2003
@@ -0,0 +1,6 @@
+# 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
+
--
Anthony Baxter <anthony@interlink.com.au>
It's never too late to have a happy childhood.