[Zope-Checkins] SVN: Zope/branches/gsoc-python-2.5/lib/python/AccessControl/ - More PEP-328 changes. Make imports absolute.
Sidnei da Silva
sidnei at enfoldsystems.com
Wed Oct 8 02:50:38 EDT 2008
Log message for revision 91895:
- More PEP-328 changes. Make imports absolute.
Changed:
U Zope/branches/gsoc-python-2.5/lib/python/AccessControl/ImplC.py
U Zope/branches/gsoc-python-2.5/lib/python/AccessControl/ImplPython.py
U Zope/branches/gsoc-python-2.5/lib/python/AccessControl/__init__.py
U Zope/branches/gsoc-python-2.5/lib/python/AccessControl/cAccessControl.c
-=-
Modified: Zope/branches/gsoc-python-2.5/lib/python/AccessControl/ImplC.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/AccessControl/ImplC.py 2008-10-08 06:43:00 UTC (rev 91894)
+++ Zope/branches/gsoc-python-2.5/lib/python/AccessControl/ImplC.py 2008-10-08 06:50:37 UTC (rev 91895)
@@ -15,18 +15,19 @@
try:
- from cAccessControl import rolesForPermissionOn, \
+ from AccessControl.cAccessControl import rolesForPermissionOn, \
PermissionRole, imPermissionRole, _what_not_even_god_should_do, \
RestrictedDTMLMixin, aq_validate, guarded_getattr, \
setDefaultBehaviors
- from cAccessControl import ZopeSecurityPolicy as cZopeSecurityPolicy
- from cAccessControl import SecurityManager as cSecurityManager
+ from AccessControl.cAccessControl import ZopeSecurityPolicy \
+ as cZopeSecurityPolicy
+ from AccessControl.cAccessControl import SecurityManager as cSecurityManager
except ImportError:
import sys
# make sure a partial import doesn't pollute sys.modules
del sys.modules[__name__]
-
-
+ raise
+
from AccessControl.ImplPython import RestrictedDTML
from AccessControl.ImplPython import SecurityManager, ZopeSecurityPolicy
Modified: Zope/branches/gsoc-python-2.5/lib/python/AccessControl/ImplPython.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/AccessControl/ImplPython.py 2008-10-08 06:43:00 UTC (rev 91894)
+++ Zope/branches/gsoc-python-2.5/lib/python/AccessControl/ImplPython.py 2008-10-08 06:50:37 UTC (rev 91895)
@@ -30,7 +30,7 @@
except ImportError:
_what_not_even_god_should_do = []
-from AccessControl import SecurityManagement
+from AccessControl.SecurityManagement import getSecurityManager
from AccessControl import Unauthorized
from AccessControl.interfaces import ISecurityPolicy
from AccessControl.interfaces import ISecurityManager
@@ -721,7 +721,7 @@
# See if we can get the value doing a filtered acquire.
# aq_acquire will either return the same value as held by
# v or it will return an Unauthorized raised by validate.
- validate = SecurityManagement.getSecurityManager().validate
+ validate = getSecurityManager().validate
aq_acquire(inst, name, aq_validate, validate)
return v
Modified: Zope/branches/gsoc-python-2.5/lib/python/AccessControl/__init__.py
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/AccessControl/__init__.py 2008-10-08 06:43:00 UTC (rev 91894)
+++ Zope/branches/gsoc-python-2.5/lib/python/AccessControl/__init__.py 2008-10-08 06:50:37 UTC (rev 91895)
@@ -14,18 +14,18 @@
from unauthorized import Unauthorized
# This has to happen early so things get initialized properly
-from Implementation import setImplementation
+from AccessControl.Implementation import setImplementation
-from SecurityManagement import getSecurityManager, setSecurityPolicy
-from SecurityInfo import ClassSecurityInfo, ModuleSecurityInfo
-from SecurityInfo import ACCESS_PRIVATE
-from SecurityInfo import ACCESS_PUBLIC
-from SecurityInfo import ACCESS_NONE
-from SecurityInfo import secureModule, allow_module, allow_class
-from SimpleObjectPolicies import allow_type
-from ZopeGuards import full_write_guard, safe_builtins
+from AccessControl.SecurityManagement import getSecurityManager, setSecurityPolicy
+from AccessControl.SecurityInfo import ClassSecurityInfo, ModuleSecurityInfo
+from AccessControl.SecurityInfo import ACCESS_PRIVATE
+from AccessControl.SecurityInfo import ACCESS_PUBLIC
+from AccessControl.SecurityInfo import ACCESS_NONE
+from AccessControl.SecurityInfo import secureModule, allow_module, allow_class
+from AccessControl.SimpleObjectPolicies import allow_type
+from AccessControl.ZopeGuards import full_write_guard, safe_builtins
ModuleSecurityInfo('AccessControl').declarePublic('getSecurityManager')
-import DTML
+from AccessControl import DTML
del DTML
Modified: Zope/branches/gsoc-python-2.5/lib/python/AccessControl/cAccessControl.c
===================================================================
--- Zope/branches/gsoc-python-2.5/lib/python/AccessControl/cAccessControl.c 2008-10-08 06:43:00 UTC (rev 91894)
+++ Zope/branches/gsoc-python-2.5/lib/python/AccessControl/cAccessControl.c 2008-10-08 06:50:37 UTC (rev 91895)
@@ -2301,7 +2301,7 @@
/*| from logger_wrapper import warn
*/
- IMPORT(module, "logger_wrapper");
+ IMPORT(module, "AccessControl.logger_wrapper");
GETATTR(module, warn);
Py_DECREF(module);
module = NULL;
More information about the Zope-Checkins
mailing list