[Checkins] [zopefoundation/zope.security] 82fd54: Changed strategy to hide wrapped to not use the se...
GitHub
noreply at github.com
Mon Mar 11 15:33:56 UTC 2013
Branch: refs/heads/pure_python_proxy
Home: https://github.com/zopefoundation/zope.security
Commit: 82fd54dca53bbd7b8700f5a240bde13bf3c41984
https://github.com/zopefoundation/zope.security/commit/82fd54dca53bbd7b8700f5a240bde13bf3c41984
Author: Stephan Richter <stephan.richter at gmail.com>
Date: 2013-03-11 (Mon, 11 Mar 2013)
Changed paths:
M src/zope/security/proxy.py
M src/zope/security/tests/test_adapter.py
M src/zope/security/tests/test_checker.py
M src/zope/security/tests/test_proxy.py
Log Message:
-----------
Changed strategy to hide wrapped to not use the secret anymore, but look
at the frames. This fixes a bunch of issues when actually doing binary
ops (for which I added a test now).
__len__ must return a non-proxied object, so I added a new parameter to
the name check wrapper to handle that case.
Fixed all but 12 test failures on PyPy.
Commit: 928658355be5bec8fa7a722b132a672e9ac6afaa
https://github.com/zopefoundation/zope.security/commit/928658355be5bec8fa7a722b132a672e9ac6afaa
Author: Stephan Richter <stephan.richter at gmail.com>
Date: 2013-03-11 (Mon, 11 Mar 2013)
Changed paths:
M src/zope/security/_compat.py
M src/zope/security/checker.py
M src/zope/security/protectclass.py
M src/zope/security/proxy.py
M src/zope/security/tests/test_proxy.py
Log Message:
-----------
- Make sure that __str__ and __repr__ never fail by catching all exceptions
and using the custom fallback. (This is equivalent to the C Proxy behavior.)
- Allow __getslice__ and __setslice__ to access the original object's
implementation instead of always falling back to __getitem__ and
__setitem__. Do we really want to support this or just remove the test?
(It is deprecated this Python 2.0!)
- Make sure that Checker.set_permissions is set initiated as an empty dict, if
not provided. While not immediately obvious, this is the C-based checker
behavior as well.
Oh yeah, all tests pass now on py26, py27, py32, py33, and pypy!
Compare: https://github.com/zopefoundation/zope.security/compare/53db18f89778...928658355be5
More information about the checkins
mailing list