[Checkins] SVN: zope.container/trunk/ Add compatibility with ZODB3 3.10 by importing the IBroken interface from it directly. Once we can rely on the new ZODB3 version exclusively, we can remove the dependency onto the zope.broken distribution.

Hanno Schlichting hannosch at hannosch.eu
Fri Jan 8 19:43:16 EST 2010


Log message for revision 107907:
  Add compatibility with ZODB3 3.10 by importing the IBroken interface from it directly. Once we can rely on the new ZODB3 version exclusively, we can remove the dependency onto the zope.broken distribution.
  

Changed:
  U   zope.container/trunk/CHANGES.txt
  U   zope.container/trunk/src/zope/container/contained.py

-=-
Modified: zope.container/trunk/CHANGES.txt
===================================================================
--- zope.container/trunk/CHANGES.txt	2010-01-09 00:24:23 UTC (rev 107906)
+++ zope.container/trunk/CHANGES.txt	2010-01-09 00:43:15 UTC (rev 107907)
@@ -5,6 +5,9 @@
 3.11.1 (unreleased)
 -------------------
 
+- Added compatibility with ZODB3 3.10 by importing the IBroken interface from
+  it directly. Once we can rely on the new ZODB3 version exclusively, we can
+  remove the dependency onto the zope.broken distribution.
 
 3.11.0 (2009-12-31)
 -------------------

Modified: zope.container/trunk/src/zope/container/contained.py
===================================================================
--- zope.container/trunk/src/zope/container/contained.py	2010-01-09 00:24:23 UTC (rev 107906)
+++ zope.container/trunk/src/zope/container/contained.py	2010-01-09 00:43:15 UTC (rev 107907)
@@ -39,8 +39,13 @@
 from zope.lifecycleevent import ObjectAddedEvent
 from zope.lifecycleevent import ObjectRemovedEvent
 
-from zope.broken.interfaces import IBroken
+# BBB ZODB3 < 3.10
+try:
+    from ZODB.interfaces import IBroken
+except ImportError:
+    from zope.broken.interfaces import IBroken
 
+
 class Contained(object):
     """Stupid mix-in that defines `__parent__` and `__name__` attributes"""
 



More information about the checkins mailing list