[Zope3-checkins] CVS: Zope3/src/zope/security - checker.py:1.22.4.2 interfaces.py:1.6.18.2 management.py:1.3.12.2 manager.py:1.3.16.2 proxy.py:1.5.2.2

Albertas Agejevas alga@codeworks.lt
Mon, 23 Jun 2003 10:21:13 -0400


Update of /cvs-repository/Zope3/src/zope/security
In directory cvs.zope.org:/tmp/cvs-serv16963/src/zope/security

Modified Files:
      Tag: cw-mail-branch
	checker.py interfaces.py management.py manager.py proxy.py 
Log Message:
One more sync with HEAD.

=== Zope3/src/zope/security/checker.py 1.22.4.1 => 1.22.4.2 ===
--- Zope3/src/zope/security/checker.py:1.22.4.1	Sun Jun 22 10:23:53 2003
+++ Zope3/src/zope/security/checker.py	Mon Jun 23 10:20:41 2003
@@ -21,6 +21,7 @@
 forbidden attribute access.  Setting it to a larger number will also display
 messages about granted attribute access.
 """
+from __future__ import generators
 
 import os
 import sys
@@ -167,8 +168,9 @@
         elif name in _always_available:
             return
 
-        __traceback_supplement__ = (TracebackSupplement, object)
-        raise ForbiddenAttribute, name
+        if name != '__iter__' or hasattr(object, name):
+            __traceback_supplement__ = (TracebackSupplement, object)
+            raise ForbiddenAttribute, name
 
     def proxy(self, value):
         'See IChecker'
@@ -698,6 +700,10 @@
 
 _InterfaceSpecification_checker = InterfaceChecker(IInterfaceSpecification)
 
+def f():
+    yield f
+    
+
 _default_checkers = {
     dict: NamesChecker(['__getitem__', '__len__', '__iter__',
                         'get', 'has_key', 'copy', '__str__', 'keys',
@@ -725,6 +731,7 @@
     type(iter(())): _iteratorChecker, # different in Python 2.3.
     type(iter({})): _iteratorChecker,
     type(iter(_Sequence())): _iteratorChecker,
+    type(f()): _iteratorChecker,
     type(Interface): InterfaceChecker(IInterface, __str__=CheckerPublic),
     ObjectSpecification: _InterfaceSpecification_checker,
     ProvidesSpecification: _InterfaceSpecification_checker,


=== Zope3/src/zope/security/interfaces.py 1.6.18.1 => 1.6.18.2 ===


=== Zope3/src/zope/security/management.py 1.3.12.1 => 1.3.12.2 ===


=== Zope3/src/zope/security/manager.py 1.3.16.1 => 1.3.16.2 ===


=== Zope3/src/zope/security/proxy.py 1.5.2.1 => 1.5.2.2 ===