Log message for revision 94453:
  Move 'ApplicationDefaultPermissiosn' from 'App.class_init' to 
'AccessControl.Permissions'.
  
  o This move breaks an import cycle in third-party code which avoids imports
    from 'Globals.'
    
  o Leave the class importable from its old location without deprecation.
  

Changed:
  U   Zope/branches/2.10/doc/CHANGES.txt
  U   Zope/branches/2.10/lib/python/AccessControl/Permission.py
  U   Zope/branches/2.10/lib/python/App/class_init.py

-=-
Modified: Zope/branches/2.10/doc/CHANGES.txt
===================================================================
--- Zope/branches/2.10/doc/CHANGES.txt  2009-01-02 18:00:47 UTC (rev 94452)
+++ Zope/branches/2.10/doc/CHANGES.txt  2009-01-02 18:09:16 UTC (rev 94453)
@@ -6,6 +6,13 @@
 
   Zope 2.10.8 (unreleased)
 
+    Restructuring
+
+      - Moved 'ApplicationDefaultPermissiosn' from 'App.class_init' to
+        'AccessControl.Permissions', in order to break an import cycle
+        in third-party code which avoids imports from 'Globals.'  Left
+        the class importable from its old location without deprecation.
+
     Bugs fixed
 
       - Products.PluginIndexes.PathIndex:  backported doc fixes /

Modified: Zope/branches/2.10/lib/python/AccessControl/Permission.py
===================================================================
--- Zope/branches/2.10/lib/python/AccessControl/Permission.py   2009-01-02 
18:00:47 UTC (rev 94452)
+++ Zope/branches/2.10/lib/python/AccessControl/Permission.py   2009-01-02 
18:09:16 UTC (rev 94453)
@@ -136,3 +136,7 @@
         if not hasattr(Globals.ApplicationDefaultPermissions, mangled):
             setattr(Globals.ApplicationDefaultPermissions,
                     mangled, default)
+
+class ApplicationDefaultPermissions:
+    _View_Permission = ('Manager', 'Anonymous')
+    _Access_contents_information_Permission = ('Manager', 'Anonymous')

Modified: Zope/branches/2.10/lib/python/App/class_init.py
===================================================================
--- Zope/branches/2.10/lib/python/App/class_init.py     2009-01-02 18:00:47 UTC 
(rev 94452)
+++ Zope/branches/2.10/lib/python/App/class_init.py     2009-01-02 18:09:16 UTC 
(rev 94453)
@@ -12,14 +12,12 @@
 ##############################################################################
 
 import logging
+
+from AccessControl.Permission import ApplicationDefaultPermissions # BBB
+from AccessControl.Permission import registerPermissions
 from AccessControl.PermissionRole import PermissionRole
-import AccessControl.Permission
 
-class ApplicationDefaultPermissions:
-    _View_Permission='Manager', 'Anonymous'
-    _Access_contents_information_Permission='Manager', 'Anonymous'
 
-
 def default__class_init__(self):
     dict=self.__dict__
     have=dict.has_key
@@ -66,7 +64,7 @@
             break
 
     if self.__dict__.has_key('__ac_permissions__'):
-        AccessControl.Permission.registerPermissions(self.__ac_permissions__)
+        registerPermissions(self.__ac_permissions__)
         for acp in self.__ac_permissions__:
             pname, mnames = acp[:2]
             if len(acp) > 2:

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to