CVS: Products/ZopeVersionControl - CHANGES.txt:1.7 __init__.py:1.4 nonversioned.py:1.5

Tres Seaver <[email protected]> Wed, 20 Sep 2006 11:05:36 -0400 (EDT)
Newsgroups gmane.comp.web.zope.public-cvs
Message-ID <[email protected]>
Update of /cvs-repository/Products/ZopeVersionControl
In directory cvs.zope.org:/tmp/cvs-serv30243

Modified Files:
	CHANGES.txt __init__.py nonversioned.py 
Log Message:
 - Fixed compatibility with Zope 2.8 and new-style objects 

o http://www.zope.org/Collectors/Zope/2137



=== Products/ZopeVersionControl/CHANGES.txt 1.6 => 1.7 ===
--- Products/ZopeVersionControl/CHANGES.txt:1.6	Fri Jun  2 16:59:06 2006
+++ Products/ZopeVersionControl/CHANGES.txt	Wed Sep 20 11:05:04 2006
@@ -1,5 +1,10 @@
 ZopeVersionControl Product Changelog
 
+  After ZopeVersionControl 0.3.2
+
+    - __init__.py, nonversioned.py:  Fixed compatibility with Zope 2.8
+      and new-style objects (http://www.zope.org/Collectors/Zope/2137)
+
   ZopeVersionControl 0.3.2 (2006/06/02)
 
     - ZopeRepository.py:  make ZR addable via GenericSetup toolset


=== Products/ZopeVersionControl/__init__.py 1.3 => 1.4 ===
--- Products/ZopeVersionControl/__init__.py:1.3	Thu Jan 16 16:31:06 2003
+++ Products/ZopeVersionControl/__init__.py	Wed Sep 20 11:05:04 2006
@@ -53,9 +53,14 @@
 
     for _class in (OFS.SimpleItem.Item, OFS.SimpleItem.Item_w__name__):
         dict = _class.__dict__
+        if not hasattr(dict, '__setitem__'):
+            # new-style classes don't need this [>=2.8]
+            continue
+
         for name, value in VersionSupport.__dict__.items():
             if name != 'manage_options':
                 dict[name] = value
+
         Globals.InitializeClass(_class)
 
 


=== Products/ZopeVersionControl/nonversioned.py 1.4 => 1.5 ===
--- Products/ZopeVersionControl/nonversioned.py:1.4	Tue Apr 20 19:04:03 2004
+++ Products/ZopeVersionControl/nonversioned.py	Wed Sep 20 11:05:04 2006
@@ -101,7 +101,7 @@
     def getNonVersionedData(self):
         data = {}
         for attr in self.attrs:
-            if hasattr(self.obj, attr):
+            if hasattr( aq_base(self.obj), attr ):
                 data[attr] = aq_base(getattr(aq_base(self.obj), attr))
         return data
 

_______________________________________________
Zope-CVS maillist  -  [email protected]
http://mail.zope.org/mailman/listinfo/zope-cvs

Zope CVS instructions: http://dev.zope.org/CVS