Commit Graph

5 Commits

Author SHA1 Message Date
Ryan Gabbard 659aa48f53 Improve documentation of safety constraints on hashable objects (#505)
* Clarify documentation for hashing

Makes clear that hashable objects need to be deeply immutable, in
practice even if not in theory.

Closes #503 .

* Use simple past tense in docs
2019-02-14 18:06:19 +01:00
Hynek Schlawack 87b2bb2e48
Add warning about subclassing behavior (#485)
Fixes #483
2019-02-05 06:45:27 +01:00
Theodore Dubois 9f4302a154 Add missing word (#456) 2018-10-28 08:10:08 +01:00
Ryan Gabbard 3e0ecbd891 Cache hash codes (#426)
* First stab at implementing hashcode caching (#423)

Currently all existing tests pass but no cache_hash tests have yet
been added.

* Existing hash tests now pass on cache_hash classes

* Add towncrier change log

* Add documentation for cache_hash

* Fixes bug with check that init=True if cache_hash=True

* Fix long lines

* Fix documentation issues

* Add test for cache_hash requiring init

* Improve test coverage

* Remove now unnecessary 'pass'

* Add periods to the end of exception strings

* Add test docstrings for cache_hash tests

* Clarify documentation of cache_hash

* Recommend that hashable classes be frozen

* Fix test references for exception messages
2018-08-20 06:46:52 +02:00
Hynek Schlawack 57817b2c0e
Add a narrative chapter on object hashing (#369)
* Add a narrative chapter on object hashing

* Simplify

* Add a "what to do" to the tl;dr warning

* Shuffle around

* Fix typos
2018-04-16 07:49:34 +02:00