[Zope-Checkins] CVS: Zope/lib/python/OFS - Application.py:1.196

Jim Fulton cvs-admin at zope.org
Fri Nov 28 11:45:26 EST 2003


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

Modified Files:
	Application.py 
Log Message:
Changed to stop using a no-longer-supported BTree implementation.

New-style class dictionaries are immutable. Changed some class-update
code to use setattr rather thah class-dictionary modifications.


=== Zope/lib/python/OFS/Application.py 1.195 => 1.196 ===
--- Zope/lib/python/OFS/Application.py:1.195	Tue Nov 18 08:17:02 2003
+++ Zope/lib/python/OFS/Application.py	Fri Nov 28 11:45:25 2003
@@ -174,8 +174,8 @@
         result=0
 
         if rebuild:
-            import BTree
-            jar.root()['ZGlobals']=BTree.BTree()
+            from BTrees.OOBTree import OOBTree
+            jar.root()['ZGlobals'] = OOBTree()
             result=1
 
         zglobals =jar.root()['ZGlobals']
@@ -396,8 +396,8 @@
     # Make sure we have Globals
     root=app._p_jar.root()
     if not root.has_key('ZGlobals'):
-        import BTree
-        app._p_jar.root()['ZGlobals']=BTree.BTree()
+        from BTrees.OOBTree import OOBTree
+        app._p_jar.root()['ZGlobals'] = OOBTree()
         get_transaction().note('Added Globals')
         get_transaction().commit()
 
@@ -684,7 +684,7 @@
                 for permission, names in new_permissions:
                     folder_permissions[permission]=names
                 new_permissions.sort()
-                Folder.Folder.__dict__['__ac_permissions__']=tuple(
+                Folder.Folder.__ac_permissions__ = tuple(
                     list(Folder.Folder.__ac_permissions__)+new_permissions)
 
             if not doInstall():




More information about the Zope-Checkins mailing list