diff options
author | Andrey Lebedev <andrey@lebedev.lt> | 2013-02-19 16:23:24 +0200 |
---|---|---|
committer | Andrey Lebedev <andrey@lebedev.lt> | 2013-02-19 16:23:24 +0200 |
commit | 7434c4686c573946feb81dcba0a670e17013a29c (patch) | |
tree | b170f0fc49ed02b5a5e92b3f53afe529eb315328 /src | |
parent | ec3ec97c92703bfb7827e7c9472bcbe0f254253e (diff) | |
download | zope-security-7434c4686c573946feb81dcba0a670e17013a29c.tar.gz |
Dictionary views are not proxied
Dict views for keys(), items(), and values() are not proxied, making
dicts work in python3 exactly as python2.
Diffstat (limited to 'src')
-rw-r--r-- | src/zope/security/checker.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/zope/security/checker.py b/src/zope/security/checker.py index e5f88dc..45ffbb2 100644 --- a/src/zope/security/checker.py +++ b/src/zope/security/checker.py @@ -595,7 +595,7 @@ _typeChecker = NamesChecker( '__implemented__']) _namedChecker = NamesChecker(['__name__']) -_iteratorChecker = NamesChecker(['next', '__iter__']) +_iteratorChecker = NamesChecker(['next', '__iter__', '__len__']) _setChecker = NamesChecker(['__iter__', '__len__', '__str__', '__contains__', 'copy', 'difference', 'intersection', 'issubset', @@ -645,6 +645,10 @@ _basic_types = { if PYTHON2: _basic_types[long] = NoProxy _basic_types[unicode] = NoProxy +else: + _basic_types[type({}.values())] = NoProxy + _basic_types[type({}.keys())] = NoProxy + _basic_types[type({}.items())] = NoProxy try: import pytz |