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

Jim Fulton cvs-admin at zope.org
Sat Nov 15 07:11:18 EST 2003


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

Modified Files:
      Tag: zodb33-devel-branch
	Application.py 
Log Message:
Changed class modification code to use setattr rather than class
dictionary manipulation, since new-style class dictionaries are
immutable

Change use of ancient BTrees for ZGlobals to use current BTrees.


=== Zope/lib/python/OFS/Application.py 1.193 => 1.193.12.1 ===
--- Zope/lib/python/OFS/Application.py:1.193	Sun Jul 20 12:16:07 2003
+++ Zope/lib/python/OFS/Application.py	Sat Nov 15 07:11:17 2003
@@ -172,8 +172,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']
@@ -269,9 +269,6 @@
         get_transaction().note('Added Control_Panel')
         get_transaction().commit()
 
-    # Initialize the cache:
-    app.Control_Panel.initialize_cache()
-
     # b/c: Ensure that a ProductFolder exists.
     if not hasattr(aq_base(app.Control_Panel), 'Products'):
         app.Control_Panel.Products=App.Product.ProductFolder()
@@ -397,8 +394,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()
 
@@ -685,7 +682,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