[Zope3-checkins] CVS: Zope3/src/zope/security - checker.py:1.40.4.1
Jim Fulton
jim at zope.com
Sat Oct 11 10:19:05 EDT 2003
Update of /cvs-repository/Zope3/src/zope/security
In directory cvs.zope.org:/tmp/cvs-serv7088/src/zope/security
Modified Files:
Tag: adaptergeddon-branch
checker.py
Log Message:
Refactored declaration framework to unify declarations and interfaces.
=== Zope3/src/zope/security/checker.py 1.40 => 1.40.4.1 ===
--- Zope3/src/zope/security/checker.py:1.40 Fri Oct 3 16:37:51 2003
+++ Zope3/src/zope/security/checker.py Sat Oct 11 10:19:04 2003
@@ -29,12 +29,10 @@
import datetime
from zope.interface import directlyProvides, Interface, implements
-from zope.interface.interfaces import IInterface, IInterfaceSpecification
-from zope.interface.declarations import ObjectSpecification
-from zope.interface.declarations import ProvidesSpecification
-from zope.interface.declarations import ImplementsOnlySpecification
-from zope.interface.declarations import ImplementsSpecification
-from zope.interface.declarations import InterfaceSpecification
+from zope.interface.interfaces import IInterface, IDeclaration
+from zope.interface.declarations import ProvidesClass
+from zope.interface.declarations import Implements
+from zope.interface.declarations import Declarationt
from zope.security.interfaces import IChecker, INameBasedChecker
from zope.security.interfaces import ISecurityProxyFactory
from zope.security.management import getSecurityManager
@@ -704,7 +702,7 @@
def __len__(self): return 0
def __getitem__(self, i): raise IndexError
-_InterfaceSpecification_checker = InterfaceChecker(IInterfaceSpecification)
+_Declaration_checker = InterfaceChecker(IDeclaration)
def f():
yield f
@@ -739,11 +737,9 @@
type(iter(_Sequence())): _iteratorChecker,
type(f()): _iteratorChecker,
type(Interface): InterfaceChecker(IInterface, __str__=CheckerPublic),
- ObjectSpecification: _InterfaceSpecification_checker,
- ProvidesSpecification: _InterfaceSpecification_checker,
- ImplementsSpecification: _InterfaceSpecification_checker,
- ImplementsOnlySpecification: _InterfaceSpecification_checker,
- InterfaceSpecification: _InterfaceSpecification_checker,
+ ProvidesClass: _Declaration_checker,
+ Implements: _Declaration_checker,
+ Declaration: _Declaration_checker,
}
def _clear():
More information about the Zope3-Checkins
mailing list