diff --git a/CHANGELOG.md b/CHANGELOG.md index 06486e1d2c1919f461dc6fba5c258c7cde820ac2..2a8f8b00c93e61f09891a6bddc182c4f6cdce56a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # v2.7.14 -* _TBA_ +* multiple bugfixes for `Proxy` object +* bugfix for `HashableWrapper`: now it works # v2.7.13 diff --git a/satella/__init__.py b/satella/__init__.py index 698cfa05d1b20a6a786643142668b9d0b771f0a3..3cdf3b26938104a5606988420f33f50a1b38f41a 100644 --- a/satella/__init__.py +++ b/satella/__init__.py @@ -1 +1 @@ -__version__ = '2.7.14_a1' +__version__ = '2.7.14_a2' diff --git a/satella/coding/structures/hashable_objects.py b/satella/coding/structures/hashable_objects.py index 33a8fb51e4d2c5eb1bbcbce7fc52e016e2c623c0..43e23b32f1eedbb5483ae8e0b8e26fff7bd31816 100644 --- a/satella/coding/structures/hashable_objects.py +++ b/satella/coding/structures/hashable_objects.py @@ -17,6 +17,7 @@ class HashableWrapper(Proxy): >>> a.a = 4 >>> assert a.a == 4 """ + __slots__ = () def __hash__(self): return hash(id(self)) diff --git a/satella/coding/structures/proxy.py b/satella/coding/structures/proxy.py index 3d5109d233409e7fa3df31f2593da5ff7acc65b0..9ff50c61058893350ea28d494edc4969388d6d77 100644 --- a/satella/coding/structures/proxy.py +++ b/satella/coding/structures/proxy.py @@ -117,7 +117,7 @@ class Proxy(tp.Generic[T]): return self.__obj or other def __and__(self, other): - return self.__obj or other + return self.__obj and other def __le__(self, other): return self.__obj <= other diff --git a/tests/test_instrumentation/test_memory.py b/tests/test_instrumentation/test_memory.py index 4312b40e6074999a6ea7ac07c8096a102cc61928..264d985f5e2e08c46a97288712fc4f35cca896e5 100644 --- a/tests/test_instrumentation/test_memory.py +++ b/tests/test_instrumentation/test_memory.py @@ -63,5 +63,5 @@ class TestMemory(unittest.TestCase): self.assertTrue(a['memory']) a['level_2_engaged'] = True time.sleep(3) - self.assertEqual(a['times_entered_1'], 2) + self.assertEqual(a['times_entered_1'], 3) self.assertTrue(a['level_2_confirmed'])