Commit Graph

7 Commits

Author SHA1 Message Date
Hynek Schlawack 08fcfe91d4
Split cmp into eq and order (#574)
* Split cmp into eq and order

Fixes #170

* Fix tests on old pypy3 versions

Old as in: currently on AP.

* Fix issue number and clarify newsfragment

* Clarify behavior and interaction between cmp/eq/order

* This sounds better

* Address Julian's review comments

* Missed a cmp

* Test the behavior of Attribute.cmp

* Make test more idiomatic

* Explain assumptions

* Clarify comment

* Grammar

* One more cmp!
2019-09-22 15:07:19 +02:00
Julian Berman 8824dc26c2 Add default_role for Sphinx. (#571)
* Add default_role for Sphinx.

Fix a bunch of broken refs along the way, which become
errors now via -W if you have default_role set.

In theory you can catch those via sphinx-build -n (i.e.
nitpick mode), which IMHO is a decent idea anyhow, but it's
a longer diff to enable that because it'd involve fixing a
bunch of the places that try to reference types that don't
exist (e.g. :type foo: Any value). But obviously can be done.

Also didn't actually use this anywhere yet (the any role),
but will do so in a follow-up if this is acceptable.

* Remove the roles from builtin objects to demo any.

* Style.

* Add z.i to intersphinx.

Enables the link to z.i.Interface.

* Enable nitpick mode.

Fix the remaining broken links or whitelist them via nitpick_ignore.

* Kill all :func:s.

* Kill all :class:es.

* Kill all :doc:s.

* Kill all :ref:s.

Except one, that probably meant :func:, and which
is a duplicate ref.

* Kill :exc: and :data:.

* Kill :mod:s.

* Kill new explicit refs from the merge.
2019-09-09 15:02:16 +02:00
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