- Use less memory in the linked lists that back bidict.OrderedBidict
by storing node data unpacked rather than in (key, value) tuple objects.
- New _Sentinel subclass of _Node improves over old _make_sentinel code.
- Also refactor and improve hypothesis tests.
- Add a test that ordered bidict nodes have no reference cycles.
- Enable coverage on Travis for PyPy 2 now that there is a code path
that is only taken on PyPy 2 (for FrozenOrderedBidict.iteritems).
- Restore running tests on Travis for all commits, not just for master.
- Docs:
- OrderedBidict: "What if my Python version has order-preserving dicts?"
- Equivalent but distinct Hashables: better code example demonstrating
that this even occurs with a bidict and its own inverse.
- improve basic usage and "Why can't I just use a dict?" docs
- rename _static -> assets
- use forward declarations of custom rst interpreted text roles we use that
sphinx defines and that PyPI and GitHub couldn't handle otherwise (e.g.
:doc:), rather than stripping them out in setup.py
- move __keywords__ and __url__ from setup.py into bidict/metadata.py
- add __version_info__ metadata attribute
- import bidict/metadata.py in setup.py rather than `exec`ing it
- add back Python 3.4 to Travis test matrix
- improve hypothesis settings for max_examples_5000 profile
(used in nightly CI builds)
- suppress hypothesis's hung_test health check for max_examples_5000 profile
to prevent flaky tests caused by failed health checks. Avoids errors like:
E hypothesis.errors.FailedHealthCheck: Your test has been running for
at least five minutes. This is probably not what you intended, so by
default Hypothesis turns it into an error.
E See https://hypothesis.readthedocs.io/en/latest/healthchecks.html for
more information about this. If you want to disable just this health
check, add HealthCheck.hung_test to the suppress_health_check settings
for this test.
The `assume(init_items != init_unequal)` was not sufficient
because it would allow cases like:
bi_cls=bidict, other_cls=bidict, init_items=[(1, 0), (0, 1)], init_unequal=[(0, 1), (1, 0)]
causing the resulting bidicts' item sets to still be equal,
so assertions like
assert items_match(some_bidict, other_unequal, relation=ne)
would fail.
Changing the assume to
assume(set(init_items) != set(init_unequal))
fixes the issue.
Surprisingly, hypothesis only just found a failing example for this
for the first time (in https://travis-ci.org/jab/bidict/jobs/363962257)
despite having numerous opportunities to find it before.
Using a new max_examples=5000 hypothesis profile, only on nightly CI,
should help surface any remaining issues that hypothesis hasn't found yet,
without slowing commit-triggered tests with too much example generation.
Also improve Travis config:
- ditch ALLOW_FAIL=1, for some reason it didn't work
- comment out python 3.7-dev job while Travis is stuck on an old 3.7 alpha
- don't use "- |" command block where we want to see output after each command
- prefix more network-dependent commands with travis_retry
Finally, improve docs building setup:
- Factor out sphinx from "dev" extras_require to its own "docs" extras_require.
- Add a .readthedocs.yml to customize the readthedocs build.
Use pip and the "docs" extras_require to get an up-to-date Sphinx version.
Fixes some broken :ref:`addendum:...` autosectionlabel links in learning-from-bidict.
- improve coverage
- use latest pip on travis
- update to tox 3
- guard Python < 3.3 warning with PYMAJOR == 3 condition
- docs improvements, esp. for viewing on GitHub:
- fix `foo <bar>`__ link syntax (always use two underscores)
- use `.. code: python` for code blocks to enable GitHub syntax highlighting
- ditch `.. include::` which GitHub does not support
- use sphinx.ext.autosectionlabel
- only wrap linkcheck with travis_retry
- s/sibbell/libraries.io