summaryrefslogtreecommitdiff
path: root/CHANGES.rst
diff options
context:
space:
mode:
authorJason Madden <jamadden@gmail.com>2017-08-30 08:50:21 -0500
committerJason Madden <jamadden@gmail.com>2017-08-30 09:05:37 -0500
commit6f8de039836b62cf8c24c5ea23dfa0e6f0e629b6 (patch)
treed33ba4f9db75c32c75e9a1ee01c196e6d0572925 /CHANGES.rst
parent4e08d85f4ad2d9fb1f1acbe1fad004c81b6d33c0 (diff)
downloadzope-security-6f8de039836b62cf8c24c5ea23dfa0e6f0e629b6.tar.gz
Fix proxying of providedBy on Python 3 and fix __length_hint__
Fixes #27. Add special cases to defaultCheckers for the two types of objects that can be returned from zope.interface.providedBy. On Python 2, these were never proxied, but on Python 3 they were. Now it's consistent (they're never proxied). (Using an _iteratorChecker for them would be a breaking change because the results of iterating them would be security proxied interface objects that don't compare equally.) Also fix `__length_hint__` while we're at it. Previously it was ignored because it is looked up on the type of the object, and proxy didn't implement that. So implement it, and add it to the list of names allowed for iterators.
Diffstat (limited to 'CHANGES.rst')
-rw-r--r--CHANGES.rst9
1 files changed, 8 insertions, 1 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index 13ea38e..1533b06 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -4,7 +4,14 @@ Changes
4.1.2 (unreleased)
------------------
-- TBD
+- Fix `issue 27 <https://github.com/zopefoundation/zope.security/issues/27>`_:
+ iteration of ``zope.interface.providedBy()`` is now allowed by
+ default on all versions of Python. Previously it only worked on
+ Python 2. Note that ``providedBy`` returns unproxied objects for backwards
+ compatibility.
+
+- Fix ``__length_hint__`` of proxied iterator objects. Previously it
+ was ignored.
4.1.1 (2017-05-17)
------------------