- Implement BidirectionalMapping.__subclasshook__ in terms of
Mapping.__subclasshook__ to simplify and correct its implementation.
- Add new test_class_relationships.py tests.
- Import collections ABCs from .compat. Importing them directly from
collections was deprecated and will stop working in Python 3.8.
In Python 2 collections.abc does not exist.
- rename util.py -> _util.py
- Refactor _dedup_item, _write_item, and _undo_write methods to use
higher-level abstractions (_DedupResult and _WriteResult classes).
- Add internal _OnDup class to bundle (on_dup_key, on_dup_val, on_dup_kv)
together into a single abstraction. Signatures of methods like _put and
_update are cleaner as a result.
- Add the "_NOOP" _DedupResult abstraction.
- Make _Marker extend namedtuple, no need for it to be mutable.
- Enable the pylint messages that were disabled now that the code is cleaner.
- Make DuplicationPolicy extend _Marker and make RAISE, OVERWRITE, and
IGNORE instances of DuplicationPolicy once again. This time deprecate
access via DuplicationPolicy.(IGNORE|RAISE|OVERWRITE) to prevent
infinite chaining.
- Misc. code and docs improvements.
- Use __slots__ to speed up attribute access and decrease memory usage
(adding _SlotPickleMixin to preserve pickleability)
- "Code review nav" comments
- Remove _clear from frozenbidict, leaving only the public `clear` methods on
the mutable bidict types. Much clearer now! (ducks)
- Improve `pop` and `popitem` signatures. No need for them to take *args/**kw.
- Make bidict extend MutableMapping directly rather than registering it as a
virtual subclass. Leave a comment explaining that it inherits
MutableMapping's setdefault implementation now that it isn't added manually.
- Make the DuplicationPolicy class just a namespace holding
RAISE, OVERWRITE, and IGNORE, not a _Marker itself.
Make RAISE, OVERWRITE, and IGNORE just _Markers, not `DuplicationPolicy`s.
- Various other code and docs improvements.
- Make :func:`bidict.FrozenOrderedBidict.__iter__` slightly more efficient.
- :func:`~bidict.frozenbidict.__repr__` no longer dynamically checks
for a ``__reversed__`` method to determine whether to use an ordered or
unordered ``__repr__`` delegate. Now it always just calls the new
:func:`~bidict.frozenbidict.__repr_delegate__` instead, which may be
explicitly overridden as needed.
- Use weakrefs to refer to a bidict's inverse to no longer create a reference
cycle. Fixes#24.
- Rename fwd_cls to fwdm_cls.
- Rename inv_cls to invm_cls.
- inv_cls now returns the inverse class of the bidict, not its invm mapping.
- Rename isinv to _isinv.
- Make initializing (or updating an empty bidict) from only another
BidirectionalMapping more efficient (skip dup checking).
- Fix accidental ignoring of specified base_type when (un)pickling
namedbidicts.
- Fix incorrect inversion of some_named_bidict.inv.[fwdname]_for
and some_named_bidict.inv.[invname]_for
- Only warn when unsupported Python version is detected.
- More tests.
- Make OrderedBidict.__eq__ always order-insensitive.
Add OrderedBidict.equals_order_sensitive for order-sensitive comparison.
Drop OrderedBidict.ordered_cls and bidict.compat.Reversible.
- Add test coverage for bidict.metadata.
- Use setuptools_scm for automatic version discovery from source control.
Drop bidict/VERSION file and associated machinery.
- Ditch testing macOS on Travis, it's just too slow.
Testing on Linux should suffice.
- Ditch using pyenv on Travis to save time and complexity.
Travis now has a better set of Python versions available out-of-the-box.
- Add support for "python setup.py test" and use that on Travis.
including:
- simplify type hierarchy, merging the frozen types into the base types
- upgrade to latest hypothesis (3.38.0)
- use Reversible for order-sensitive FrozenOrderedBidict.__eq__
- fix bug where bidict._on_dup_kv was not set to ON_DUP_VAL as documented
- drop leading underscore from attrs that should be public
- improve setup.py/metadata
- rename DuplicationBehavior -> DuplicationPolicy
- drop ON_DUP_VAL duplication policy in preference to just using None
- reduce ordered bidict memory usage and speed up copy
- .travis.yml and setup.py tweaks
- add regression tests for -O bug and document fix
- Make OrderedBidict equality comparison order-sensitive in more cases.
- Add bidict.BidictBase.ordered class attribute.
- Replacing OrderedBidictBase._should_compare_order_sensitive()
with OrderedBidictBase.should_compare_order_sensitive_to().
- Revert the optimizations in v0.13.0 to make FrozenOrderedBidict instances
that have the same items in different order have different hash values.
- Remove FrozenBidictBase.
- Remove frozenbidict._USE_ITEMSVIEW_HASH and
frozenorderedbidict._HASH_NITEMS_MAX
- support Python 3.6, refactor CI/test setup, increase test coverage
- refactor BidirectionalMapping, BidictBase, OrderedBidictBase,
FrozenBidictBase, and subclasses
- move frozenorderedbidict into _frozen and looseorderedbidict into _loose
- register bidict as a virtual subclass of MutableMapping rather than
inheriting from it directly. This makes it clearer that it does not use any
of the concrete generic methods that MutableMapping provides.
- improve performance and flexibility of frozenbidict and
frozenorderedbidict hashing
- docs, including new type-hierarchy.png diagram
- rm unused imap, ifilter, izip_longest from compat, add PYPY
- update to latest versions of dependencies
- restore benchmarking on travis
- use latest patch releases of all python versions via pyenv
- use caching to speed up travis builds
- peg to latest versions of test deps (including hypothesis 2.0)
- set hypothesis to strict
- explicitly set average_size on strategies that accept it
- drop pypy3, not worth supporting till it catches up to cpython
- only pass --cov for python27 and 35; with other versions, it slows down
hypothesis data generation so much, the health checks fail
- refactor tox and travis setup to use new test.sh helper script