[Zope-Checkins] CVS: Zope/lib/python/App - CacheManager.py:1.30.2.1 Management.py:1.64.2.1 PersistentExtra.py:1.8.92.1 ProductContext.py:1.43.26.1 class_init.py:1.14.92.1

Jim Fulton cvs-admin at zope.org
Tue Nov 25 15:17:54 EST 2003


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

Modified Files:
      Tag: Zope-2_8-devel-branch
	CacheManager.py Management.py PersistentExtra.py 
	ProductContext.py class_init.py 
Log Message:
merged everything but ZODB and ZEO from zodb33-devel-branch


=== Zope/lib/python/App/CacheManager.py 1.30 => 1.30.2.1 ===


=== Zope/lib/python/App/Management.py 1.64 => 1.64.2.1 ===
--- Zope/lib/python/App/Management.py:1.64	Tue Nov 18 08:16:58 2003
+++ Zope/lib/python/App/Management.py	Tue Nov 25 15:17:22 2003
@@ -53,16 +53,11 @@
             if path is None:
                     path=d['action']
 
-            o=self.unrestrictedTraverse(path, None)
+            o=self.restrictedTraverse(path, None)
             if o is None:
-                    continue
+                continue
 
-            try:
-                if validate(None, self, None, o):
-                    result.append(d)
-            except:
-                if not hasattr(o, '__roles__'):
-                    result.append(d)
+            result.append(d)
 
         return result
 


=== Zope/lib/python/App/PersistentExtra.py 1.8 => 1.8.92.1 ===
--- Zope/lib/python/App/PersistentExtra.py:1.8	Wed Aug 14 17:31:40 2002
+++ Zope/lib/python/App/PersistentExtra.py	Tue Nov 25 15:17:22 2003
@@ -16,7 +16,7 @@
 import Globals
 from DateTime import DateTime
 
-Persistent.__dict__['__class_init__']=default__class_init__
+Persistent.__class_init__ = default__class_init__
 
 class PersistentUtil:
 
@@ -69,4 +69,7 @@
         except: return 0
         return 1
 
-for k, v in PersistentUtil.__dict__.items(): Persistent.__dict__[k]=v
+for k, v in PersistentUtil.__dict__.items():
+    if k[0] != '_':
+        setattr(Persistent, k, v)
+


=== Zope/lib/python/App/ProductContext.py 1.43 => 1.43.26.1 ===
--- Zope/lib/python/App/ProductContext.py:1.43	Fri May  2 18:01:34 2003
+++ Zope/lib/python/App/ProductContext.py	Tue Nov 25 15:17:22 2003
@@ -166,8 +166,10 @@
 
             fd = pack.__FactoryDispatcher__ = __FactoryDispatcher__
 
-        if not hasattr(pack, '_m'): pack._m=fd.__dict__
-        m=pack._m
+        if not hasattr(pack, '_m'):
+            pack._m = AttrDict(fd)
+
+        m = pack._m
 
         if interfaces is _marker:
             if instance_class is None:
@@ -341,3 +343,11 @@
                     continue
                 ht=APIHelpTopic.APIHelpTopic(file, '', os.path.join(path, file))
                 self.registerHelpTopic(file, ht)
+
+class AttrDict:
+
+    def __init__(self, ob):
+        self.ob = ob
+
+    def __setitem__(self, name, v):
+        setattr(self.ob, name, v)


=== Zope/lib/python/App/class_init.py 1.14 => 1.14.92.1 ===
--- Zope/lib/python/App/class_init.py:1.14	Wed Aug 14 17:31:41 2002
+++ Zope/lib/python/App/class_init.py	Tue Nov 25 15:17:22 2003
@@ -46,11 +46,13 @@
                 d['__name__']=name
             if name=='manage' or name[:7]=='manage_':
                 name=name+'__roles__'
-                if not have(name): dict[name]=('Manager',)
+                if not have(name):
+                    setattr(self, name, ('Manager',))
         elif name=='manage' or name[:7]=='manage_' and type(v) is ft:
             name=name+'__roles__'
-            if not have(name): dict[name]='Manager',
-
+            if not have(name):
+                setattr(self, name, ('Manager',))
+                
     # Look for a SecurityInfo object on the class. If found, call its
     # apply() method to generate __ac_permissions__ for the class. We
     # delete the SecurityInfo from the class dict after it has been
@@ -59,7 +61,7 @@
         if hasattr(value, '__security_info__'):
             security_info=value
             security_info.apply(self)
-            del dict[key]
+            delattr(self, key)
             break
 
     if self.__dict__.has_key('__ac_permissions__'):
@@ -72,4 +74,4 @@
             else:
                 pr=PermissionRole(pname)
             for mname in mnames:
-                dict[mname+'__roles__']=pr
+                setattr(self, mname+'__roles__', pr)




More information about the Zope-Checkins mailing list