summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Niemeyer <gustavo@niemeyer.net>2010-06-19 23:04:28 -0300
committerGustavo Niemeyer <gustavo@niemeyer.net>2010-06-19 23:04:28 -0300
commitec806395660c58d41f1bf8b19a63652fba40834d (patch)
tree888ca093ac8c422dd1ec61c2137b6547867c2719
parent9fd75500a2d7097c539ea4be23fa9763b02c3d29 (diff)
downloadmocker-ec806395660c58d41f1bf8b19a63652fba40834d.tar.gz
Updated NEWS file.
-rw-r--r--NEWS9
-rw-r--r--mocker.py2
2 files changed, 11 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 5693fb3..b38212c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,12 @@
+0.11 (2010-XX-XX)
+=================
+
+- Fixed support for Python 2.6. Mocking of iterators was broken in
+ certain cases because, even though that's *not* documented, Python
+ tries to use __length_hint__ in some cases.
+
+
+
0.10.1 (2007-12-11)
===================
diff --git a/mocker.py b/mocker.py
index eb03bac..8475868 100644
--- a/mocker.py
+++ b/mocker.py
@@ -1054,6 +1054,8 @@ class Mock(object):
return type(self)
return self.__mocker_type__
if name == "__length_hint__":
+ # This is used by Python 2.6+ to optimize the allocation
+ # of arrays in certain cases. Pretend it doesn't exist.
raise AttributeError("No __length_hint__ here!")
return self.__mocker_act__("getattr", (name,))