[Checkins] SVN: zope.security/trunk/ Import cleanup.

Tres Seaver cvs-admin at zope.org
Mon Dec 24 20:25:28 UTC 2012


Log message for revision 128898:
  Import cleanup.

Changed:
  _U  zope.security/trunk/
  U   zope.security/trunk/src/zope/security/checker.py

-=-
Modified: zope.security/trunk/src/zope/security/checker.py
===================================================================
--- zope.security/trunk/src/zope/security/checker.py	2012-12-24 18:06:13 UTC (rev 128897)
+++ zope.security/trunk/src/zope/security/checker.py	2012-12-24 20:25:27 UTC (rev 128898)
@@ -23,6 +23,7 @@
 Note that the ZOPE_WATCH_CHECKERS mechanism will eventually be
 replaced with a more general security auditing mechanism.
 """
+import abc
 import os
 import sys
 import types
@@ -34,14 +35,20 @@
 import zope.interface.interfaces
 import zope.interface.declarations
 from zope.i18nmessageid import Message
-from zope.interface import directlyProvides, Interface, implementer
-from zope.interface.interfaces import IInterface, IDeclaration
+from zope.interface import Interface
+from zope.interface import directlyProvides
+from zope.interface import implementer
+from zope.interface.interfaces import IDeclaration
+from zope.interface.interfaces import IInterface
 
-from zope.security.interfaces import IChecker, INameBasedChecker
+from zope.security.interfaces import IChecker
+from zope.security.interfaces import INameBasedChecker
 from zope.security.interfaces import ISecurityProxyFactory
-from zope.security.interfaces import Unauthorized, ForbiddenAttribute
+from zope.security.interfaces import ForbiddenAttribute
+from zope.security.interfaces import Unauthorized
 from zope.security._definitions import thread_local
-from zope.security._proxy import _Proxy as Proxy, getChecker
+from zope.security._proxy import _Proxy as Proxy
+from zope.security._proxy import getChecker
 
 try:
     from zope.exceptions import DuplicationError
@@ -728,18 +735,10 @@
     zope.interface.declarations.ClassProvides: _Declaration_checker,
     zope.interface.declarations.Implements: _Declaration_checker,
     zope.interface.declarations.Declaration: _Declaration_checker,
+    abc.ABCMeta: _typeChecker,
 }
 
-if sys.version_info < (2, 6):
-    import sets
-    _default_checkers[sets.Set] = _setChecker
-    _default_checkers[sets.ImmutableSet] = _setChecker
 
-if sys.version_info >= (2, 6):
-    import abc
-    _default_checkers[abc.ABCMeta] = _typeChecker
-
-
 def _clear():
     _checkers.clear()
     _checkers.update(_default_checkers)



More information about the checkins mailing list