2016-06-28 04:05:22 +00:00
|
|
|
|
.. _changelog:
|
|
|
|
|
|
|
|
|
|
Changelog
|
|
|
|
|
=========
|
|
|
|
|
|
2017-03-31 18:58:44 +00:00
|
|
|
|
.. include:: release-notifications.rst.inc
|
2016-06-28 04:05:22 +00:00
|
|
|
|
|
|
|
|
|
|
2017-12-07 17:57:01 +00:00
|
|
|
|
0.15.0 (not yet released)
|
|
|
|
|
-------------------------
|
|
|
|
|
|
|
|
|
|
- Use weakrefs to refer to a bidict's inverse internally,
|
|
|
|
|
no longer creating a reference cycle.
|
|
|
|
|
Memory for a bidict that you create can now be reclaimed
|
|
|
|
|
as soon as you no longer hold any references to it.
|
2017-12-17 18:58:57 +00:00
|
|
|
|
See the new :ref:`inv-avoids-reference-cycles` documentation.
|
2017-12-07 17:57:01 +00:00
|
|
|
|
Fixes `#24 <https://github.com/jab/bidict/issues/20>`_.
|
|
|
|
|
|
|
|
|
|
Breaking API Changes
|
|
|
|
|
++++++++++++++++++++
|
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- Rename ``fwd_cls`` → :attr:`~bidict.frozenbidict.fwdm_cls`
|
2017-12-07 17:57:01 +00:00
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- Rename ``inv_cls`` → :attr:`~bidict.frozenbidict.invm_cls`
|
2017-12-07 17:57:01 +00:00
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:attr:`~bidict.frozenbidict.inv_cls`
|
2017-12-07 17:57:01 +00:00
|
|
|
|
now refers to a new classmethod that returns
|
|
|
|
|
the computed inverse bidict class,
|
|
|
|
|
not the user-overridable class of the backing inverse mapping.
|
|
|
|
|
|
|
|
|
|
This enabled improving the logic if you specify a different
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:attr:`~bidict.frozenbidict.fwdm_cls` and
|
|
|
|
|
:attr:`~bidict.frozenbidict.invm_cls`
|
2017-12-07 17:57:01 +00:00
|
|
|
|
in a custom bidict subclass,
|
|
|
|
|
as in the :ref:`sorted-bidict-recipes`:
|
|
|
|
|
bidict now dynamically computes the
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:attr:`~bidict.frozenbidict.inv_cls`
|
2017-12-07 17:57:01 +00:00
|
|
|
|
of your custom bidict to have the inverse
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:attr:`~bidict.frozenbidict.fwdm_cls` and
|
|
|
|
|
:attr:`~bidict.frozenbidict.invm_cls`
|
2017-12-07 17:57:01 +00:00
|
|
|
|
of your custom bidict.
|
|
|
|
|
|
|
|
|
|
If creating a new instance of such a custom bidict
|
|
|
|
|
from the inverse of an existing instance,
|
2018-01-02 21:49:34 +00:00
|
|
|
|
the :attr:`~bidict.frozenbidict.fwdm_cls`
|
|
|
|
|
and :attr:`~bidict.frozenbidict.invm_cls`
|
2017-12-07 17:57:01 +00:00
|
|
|
|
of the new instance are no longer incorrectly swapped.
|
|
|
|
|
|
|
|
|
|
- Rename ``isinv`` to ``_isinv``.
|
|
|
|
|
|
|
|
|
|
|
2017-12-06 19:22:32 +00:00
|
|
|
|
0.14.2 (2017-12-06)
|
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
|
|
- Make initializing (or updating an empty bidict) from only another
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:class:`~bidict.BidirectionalMapping`
|
2017-12-06 19:22:32 +00:00
|
|
|
|
more efficient by skipping unnecessary duplication checking.
|
|
|
|
|
|
|
|
|
|
- Fix accidental ignoring of specified ``base_type`` argument
|
2018-01-02 21:49:34 +00:00
|
|
|
|
when (un)pickling a :func:`~bidict.namedbidict`.
|
2017-12-06 19:22:32 +00:00
|
|
|
|
|
|
|
|
|
- Fix incorrect inversion of
|
|
|
|
|
``some_named_bidict.inv.[fwdname]_for`` and
|
|
|
|
|
``some_named_bidict.inv.[invname]_for``.
|
|
|
|
|
|
|
|
|
|
- Only warn when an unsupported Python version is detected
|
|
|
|
|
(e.g. Python < 2.7) rather than raising :class:`AssertionError`.
|
|
|
|
|
|
|
|
|
|
|
2017-11-29 02:27:36 +00:00
|
|
|
|
0.14.1 (2017-11-28)
|
|
|
|
|
-------------------
|
2017-11-29 01:56:50 +00:00
|
|
|
|
|
|
|
|
|
- Fix a bug introduced in 0.14.0 where hashing a
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:class:`~bidict.frozenbidict`\’s inverse
|
2017-11-29 01:56:50 +00:00
|
|
|
|
(e.g. ``f = frozenbidict(); {f.inv: '...'}``)
|
|
|
|
|
would cause an ``AttributeError``.
|
|
|
|
|
|
|
|
|
|
- Fix a bug introduced in 0.14.0 for Python 2 users where calling
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:meth:`~bidict.frozenbidict.viewitems`
|
2017-11-29 01:56:50 +00:00
|
|
|
|
would cause a ``TypeError``.
|
|
|
|
|
Thanks Richard Sanger for
|
|
|
|
|
`reporting <https://github.com/jab/bidict/issues/48>`_.
|
2017-11-29 01:36:39 +00:00
|
|
|
|
|
|
|
|
|
|
2017-11-21 04:49:12 +00:00
|
|
|
|
0.14.0 (2017-11-20)
|
|
|
|
|
-------------------
|
2017-03-15 20:50:22 +00:00
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- Fix a bug where :class:`~bidict.bidict`\’s
|
2017-11-21 03:27:26 +00:00
|
|
|
|
default *on_dup_kv* policy was set to
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:attr:`~bidict.DuplicationPolicy.RAISE`,
|
2017-11-21 03:27:26 +00:00
|
|
|
|
rather than matching whatever *on_dup_val* policy was in effect
|
|
|
|
|
as was :ref:`documented <key-and-value-duplication>`.
|
2017-11-18 03:35:40 +00:00
|
|
|
|
|
2017-11-21 03:27:26 +00:00
|
|
|
|
- Fix a bug that could happen when using Python's optimization (``-O``) flag
|
2017-11-20 03:24:08 +00:00
|
|
|
|
that could leave an ordered bidict in an inconsistent state
|
|
|
|
|
when dealing with duplicated, overwritten keys or values.
|
2017-11-21 03:27:26 +00:00
|
|
|
|
If you do not use optimizations
|
|
|
|
|
(specifically, skipping ``assert`` statements),
|
|
|
|
|
this would not have affected you.
|
2017-11-18 03:35:40 +00:00
|
|
|
|
|
2017-11-21 03:27:26 +00:00
|
|
|
|
- Fix a bug introduced by the optimizations in 0.13.0 that could cause
|
|
|
|
|
a frozen bidict that compared equal to another mapping
|
|
|
|
|
to have a different hash value from the other mapping,
|
|
|
|
|
violating Python's object model.
|
|
|
|
|
This would only have affected you if you were inserting a
|
|
|
|
|
frozen bidict and some other immutable mapping that it compared equal to
|
|
|
|
|
into the same set or mapping.
|
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- Add :meth:`~bidict.FrozenOrderedBidict.equals_order_sensitive`.
|
2017-11-18 03:35:40 +00:00
|
|
|
|
|
2017-11-20 03:24:08 +00:00
|
|
|
|
- Reduce the memory usage of ordered bidicts.
|
2017-11-18 03:35:40 +00:00
|
|
|
|
|
2017-11-20 03:24:08 +00:00
|
|
|
|
- Make copying of ordered bidicts faster.
|
2017-11-18 03:35:40 +00:00
|
|
|
|
|
|
|
|
|
- Improvements to tests and CI, including:
|
2017-11-16 20:44:51 +00:00
|
|
|
|
|
2017-11-21 03:27:26 +00:00
|
|
|
|
- Test on Windows
|
2017-11-16 20:44:51 +00:00
|
|
|
|
- Test with PyPy3
|
|
|
|
|
- Test with CPython 3.7-dev
|
2017-11-18 03:35:40 +00:00
|
|
|
|
- Test with optimization flags
|
|
|
|
|
- Require pylint to pass
|
2017-11-16 20:44:51 +00:00
|
|
|
|
|
2017-11-20 03:24:08 +00:00
|
|
|
|
|
2017-11-16 20:44:51 +00:00
|
|
|
|
Breaking API Changes
|
|
|
|
|
++++++++++++++++++++
|
|
|
|
|
|
2017-11-20 03:24:08 +00:00
|
|
|
|
This release includes multiple API simplifications and improvements.
|
|
|
|
|
|
2017-11-21 03:27:26 +00:00
|
|
|
|
- Rename:
|
2017-11-20 03:24:08 +00:00
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- ``orderedbidict`` → :class:`~bidict.OrderedBidict`
|
|
|
|
|
- ``frozenorderedbidict`` → :class:`~bidict.FrozenOrderedBidict`
|
2017-11-20 03:24:08 +00:00
|
|
|
|
|
|
|
|
|
so that these now match the case of :class:`collections.OrderedDict`.
|
|
|
|
|
|
|
|
|
|
The names of the
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:class:`~bidict.bidict`,
|
|
|
|
|
:func:`~bidict.namedbidict`, and
|
|
|
|
|
:class:`~bidict.frozenbidict` classes
|
2017-11-20 03:24:08 +00:00
|
|
|
|
have been retained as all-lowercase
|
|
|
|
|
so that they continue to match the case of
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:class:`dict`, :func:`~collections.namedtuple`, and
|
2017-11-20 03:24:08 +00:00
|
|
|
|
:class:`frozenset`, respectively.
|
|
|
|
|
|
2017-11-21 03:27:26 +00:00
|
|
|
|
- The ``ON_DUP_VAL`` duplication policy value for *on_dup_kv* has been removed.
|
2017-11-20 03:24:08 +00:00
|
|
|
|
Use ``None`` instead.
|
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- Merge :class:`~bidict.frozenbidict` and ``BidictBase``
|
2017-11-20 03:24:08 +00:00
|
|
|
|
together and remove ``BidictBase``.
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:class:`~bidict.frozenbidict`
|
2017-11-20 03:24:08 +00:00
|
|
|
|
is now the concrete base class that all other bidict types derive from.
|
|
|
|
|
See the updated :ref:`bidict-type-hierarchy`.
|
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- Merge :class:`~bidict.frozenbidict` and ``FrozenBidictBase``
|
2017-11-20 03:24:08 +00:00
|
|
|
|
together and remove ``FrozenBidictBase``.
|
|
|
|
|
See the updated :ref:`bidict-type-hierarchy`.
|
|
|
|
|
|
|
|
|
|
- Merge ``frozenorderedbidict`` and ``OrderedBidictBase`` together
|
2018-01-02 21:49:34 +00:00
|
|
|
|
into a single :class:`~bidict.FrozenOrderedBidict`
|
2017-11-21 03:27:26 +00:00
|
|
|
|
class and remove ``OrderedBidictBase``.
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:class:`~bidict.OrderedBidict` now extends
|
|
|
|
|
:class:`~bidict.FrozenOrderedBidict`
|
2017-11-21 03:27:26 +00:00
|
|
|
|
to add mutable behavior.
|
2017-11-20 03:24:08 +00:00
|
|
|
|
See the updated :ref:`bidict-type-hierarchy`.
|
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- Make :meth:`~bidict.FrozenOrderedBidict.__eq__`
|
2017-11-21 03:27:26 +00:00
|
|
|
|
always perform an order-insensitive equality test,
|
|
|
|
|
even if the other mapping is ordered.
|
2017-11-20 03:24:08 +00:00
|
|
|
|
|
|
|
|
|
Previously,
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:meth:`~bidict.FrozenOrderedBidict.__eq__`
|
2017-11-21 03:27:26 +00:00
|
|
|
|
was only order-sensitive for other ``OrderedBidictBase`` subclasses,
|
|
|
|
|
and order-insensitive otherwise.
|
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
Use the new :meth:`~bidict.FrozenOrderedBidict.equals_order_sensitive`
|
2017-11-21 03:27:26 +00:00
|
|
|
|
method for order-sensitive equality comparison.
|
2017-11-20 03:24:08 +00:00
|
|
|
|
|
2017-11-21 03:27:26 +00:00
|
|
|
|
- ``orderedbidict._should_compare_order_sensitive()`` has been removed.
|
2017-11-20 03:24:08 +00:00
|
|
|
|
|
|
|
|
|
- ``frozenorderedbidict._HASH_NITEMS_MAX`` has been removed.
|
2017-11-18 03:35:40 +00:00
|
|
|
|
Since its hash value must be computed from all contained items
|
2017-11-20 03:24:08 +00:00
|
|
|
|
(so that hash results are consistent with
|
|
|
|
|
equality comparisons against unordered mappings),
|
|
|
|
|
the number of items that influence the hash value should not be limitable.
|
2017-11-18 03:35:40 +00:00
|
|
|
|
|
2017-11-20 03:24:08 +00:00
|
|
|
|
- ``frozenbidict._USE_ITEMSVIEW_HASH`` has been removed, and
|
2018-01-02 21:49:34 +00:00
|
|
|
|
``frozenbidict.compute_hash()``
|
2017-11-20 03:24:08 +00:00
|
|
|
|
now uses ``collections.ItemsView._hash()`` to compute the hash always,
|
2017-11-18 03:35:40 +00:00
|
|
|
|
not just when running on PyPy.
|
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
Override ``frozenbidict.compute_hash()``
|
2017-11-18 03:35:40 +00:00
|
|
|
|
to return ``hash(frozenset(iteritems(self)))``
|
|
|
|
|
if you prefer the old default behavior on CPython,
|
|
|
|
|
which takes linear rather than constant space,
|
|
|
|
|
but which uses the ``frozenset_hash`` routine
|
|
|
|
|
(implemented in ``setobject.c``)
|
|
|
|
|
rather than the pure Python ``ItemsView._hash()`` routine.
|
|
|
|
|
|
2017-11-20 03:24:08 +00:00
|
|
|
|
- ``loosebidict`` and ``looseorderedbidict`` have been removed.
|
|
|
|
|
Simple recipes to implement them yourself are now given in
|
|
|
|
|
:ref:`overwritingbidict`.
|
|
|
|
|
|
2017-11-21 03:27:26 +00:00
|
|
|
|
- Rename ``FrozenBidictBase._compute_hash()`` →
|
2018-01-02 21:49:34 +00:00
|
|
|
|
``frozenbidict.compute_hash()``
|
2017-11-20 03:24:08 +00:00
|
|
|
|
|
2017-11-21 03:27:26 +00:00
|
|
|
|
- Rename ``DuplicationBehavior`` →
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:class:`~bidict.DuplicationPolicy`.
|
2017-11-20 03:24:08 +00:00
|
|
|
|
|
2017-11-21 03:27:26 +00:00
|
|
|
|
- Rename:
|
2017-11-18 03:35:40 +00:00
|
|
|
|
|
2017-11-20 03:24:08 +00:00
|
|
|
|
- ``bidict.BidictBase._fwd_class`` → :attr:`bidict.frozenbidict.fwd_cls`
|
|
|
|
|
- ``bidict.BidictBase._inv_class`` → :attr:`bidict.frozenbidict.inv_cls`
|
|
|
|
|
- ``bidict.BidictBase._on_dup_key`` → :attr:`bidict.frozenbidict.on_dup_key`
|
|
|
|
|
- ``bidict.BidictBase._on_dup_val`` → :attr:`bidict.frozenbidict.on_dup_val`
|
|
|
|
|
- ``bidict.BidictBase._on_dup_kv`` → :attr:`bidict.frozenbidict.on_dup_kv`
|
2017-03-15 20:50:22 +00:00
|
|
|
|
|
2017-03-15 20:43:23 +00:00
|
|
|
|
|
|
|
|
|
0.13.1 (2017-03-15)
|
|
|
|
|
-------------------
|
2017-01-19 05:26:21 +00:00
|
|
|
|
|
2017-03-15 19:45:40 +00:00
|
|
|
|
- Fix regression introduced by the new
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:meth:`~bidict.BidirectionalMapping.__subclasshook__`
|
2017-03-15 19:45:40 +00:00
|
|
|
|
functionality in 0.13.0 so that
|
|
|
|
|
``issubclass(OldStyleClass, BidirectionalMapping)`` once again
|
|
|
|
|
works with old-style classes,
|
|
|
|
|
returning ``False`` rather than raising :class:`AttributeError`
|
2017-11-20 03:24:08 +00:00
|
|
|
|
(`thanks, @knaperek <https://github.com/jab/bidict/pull/41>`_).
|
2017-03-15 19:45:40 +00:00
|
|
|
|
|
2017-01-19 05:26:21 +00:00
|
|
|
|
|
2017-01-19 05:08:38 +00:00
|
|
|
|
0.13.0 (2017-01-19)
|
|
|
|
|
-------------------
|
squashed changes for 0.13.0
- 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
2017-01-09 15:37:31 +00:00
|
|
|
|
|
|
|
|
|
- Support Python 3.6.
|
|
|
|
|
|
|
|
|
|
(Earlier versions of bidict should work fine on 3.6, but it is officially
|
|
|
|
|
supported starting in this version.)
|
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- :class:`~bidict.BidirectionalMapping`
|
squashed changes for 0.13.0
- 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
2017-01-09 15:37:31 +00:00
|
|
|
|
has been refactored into an abstract base class,
|
|
|
|
|
following the way :class:`collections.abc.Mapping` works.
|
|
|
|
|
The concrete method implementations it used to provide have been moved
|
2017-11-20 03:24:08 +00:00
|
|
|
|
into a new ``BidictBase`` subclass.
|
squashed changes for 0.13.0
- 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
2017-01-09 15:37:31 +00:00
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:class:`~bidict.BidirectionalMapping`
|
squashed changes for 0.13.0
- 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
2017-01-09 15:37:31 +00:00
|
|
|
|
now also implements
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:meth:`~bidict.BidirectionalMapping.__subclasshook__`,
|
squashed changes for 0.13.0
- 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
2017-01-09 15:37:31 +00:00
|
|
|
|
so any class that provides a conforming set of attributes
|
2018-01-02 21:49:34 +00:00
|
|
|
|
(enumerated in :attr:`~bidict.BidirectionalMapping._subclsattrs`)
|
squashed changes for 0.13.0
- 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
2017-01-09 15:37:31 +00:00
|
|
|
|
will be considered a
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:class:`~bidict.BidirectionalMapping`
|
squashed changes for 0.13.0
- 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
2017-01-09 15:37:31 +00:00
|
|
|
|
subclass automatically.
|
|
|
|
|
|
2017-11-20 03:24:08 +00:00
|
|
|
|
- ``OrderedBidirectionalMapping`` has been renamed to ``OrderedBidictBase``,
|
|
|
|
|
to better reflect its function. (It is not an ABC.)
|
squashed changes for 0.13.0
- 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
2017-01-09 15:37:31 +00:00
|
|
|
|
|
2017-11-18 03:35:40 +00:00
|
|
|
|
- A new ``FrozenBidictBase`` class has been factored out of
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:class:`~bidict.frozenbidict` and
|
2017-11-16 20:44:51 +00:00
|
|
|
|
:class:`frozenorderedbidict <bidict.FrozenOrderedBidict>`.
|
squashed changes for 0.13.0
- 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
2017-01-09 15:37:31 +00:00
|
|
|
|
This implements common behavior such as caching the result of
|
2017-11-18 03:35:40 +00:00
|
|
|
|
``__hash__`` after the first call.
|
squashed changes for 0.13.0
- 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
2017-01-09 15:37:31 +00:00
|
|
|
|
|
|
|
|
|
- The hash implementations of
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:class:`~bidict.frozenbidict` and
|
2017-11-16 20:44:51 +00:00
|
|
|
|
:class:`frozenorderedbidict <bidict.FrozenOrderedBidict>`.
|
2017-11-21 03:27:26 +00:00
|
|
|
|
have been reworked to improve performance and flexibility.
|
2017-11-29 01:36:39 +00:00
|
|
|
|
:class:`frozenorderedbidict <bidict.FrozenOrderedBidict>`\’s
|
2017-11-21 03:27:26 +00:00
|
|
|
|
hash implementation is now order-sensitive.
|
squashed changes for 0.13.0
- 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
2017-01-09 15:37:31 +00:00
|
|
|
|
|
|
|
|
|
See
|
2018-01-02 21:49:34 +00:00
|
|
|
|
``frozenbidict._compute_hash()`` and
|
2017-11-18 03:35:40 +00:00
|
|
|
|
``frozenorderedbidict._compute_hash``
|
squashed changes for 0.13.0
- 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
2017-01-09 15:37:31 +00:00
|
|
|
|
for more documentation of the changes,
|
|
|
|
|
including the new
|
2017-11-18 03:35:40 +00:00
|
|
|
|
``frozenbidict._USE_ITEMSVIEW_HASH`` and
|
|
|
|
|
``frozenorderedbidict._HASH_NITEMS_MAX``
|
squashed changes for 0.13.0
- 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
2017-01-09 15:37:31 +00:00
|
|
|
|
attributes.
|
|
|
|
|
If you have an interesting use case that requires overriding these,
|
|
|
|
|
or suggestions for an alternative implementation,
|
|
|
|
|
please `share your feedback <https://gitter.im/jab/bidict>`_.
|
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- Add :attr:`_fwd_class <bidict.frozenbidict.fwdm_cls>` and
|
|
|
|
|
:attr:`_inv_class <bidict.frozenbidict.invm_cls>` attributes
|
|
|
|
|
representing the backing :class:`~collections.abc.Mapping` types
|
squashed changes for 0.13.0
- 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
2017-01-09 15:37:31 +00:00
|
|
|
|
used internally to store the forward and inverse dictionaries, respectively.
|
|
|
|
|
|
|
|
|
|
This allows creating custom bidict types with extended functionality
|
|
|
|
|
simply by overriding these attributes in a subclass.
|
|
|
|
|
|
|
|
|
|
See the new :ref:`extending` documentation for examples.
|
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- Pass any parameters passed to :meth:`~bidict.bidict.popitem`
|
squashed changes for 0.13.0
- 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
2017-01-09 15:37:31 +00:00
|
|
|
|
through to ``_fwd.popitem`` for greater extensibility.
|
|
|
|
|
|
|
|
|
|
- More concise repr strings for empty bidicts.
|
|
|
|
|
|
|
|
|
|
e.g. ``bidict()`` rather than ``bidict({})`` and
|
|
|
|
|
``orderedbidict()`` rather than ``orderedbidict([])``.
|
|
|
|
|
|
|
|
|
|
- Add :attr:`bidict.compat.PYPY` and
|
|
|
|
|
remove unused ``bidict.compat.izip_longest``.
|
|
|
|
|
|
2016-07-04 03:29:24 +00:00
|
|
|
|
0.12.0 (2016-07-03)
|
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
|
|
- New/renamed exceptions:
|
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- :class:`~bidict.KeyDuplicationError`
|
|
|
|
|
- :class:`~bidict.ValueDuplicationError`
|
|
|
|
|
- :class:`~bidict.KeyAndValueDuplicationError`
|
|
|
|
|
- :class:`~bidict.DuplicationError` (base class for the above)
|
2016-06-28 04:05:22 +00:00
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- :func:`~bidict.bidict.put`
|
2016-06-28 04:05:22 +00:00
|
|
|
|
now accepts ``on_dup_key``, ``on_dup_val``, and ``on_dup_kv`` keyword args
|
2017-11-20 03:24:08 +00:00
|
|
|
|
which allow you to override the default policy
|
2016-07-04 03:29:24 +00:00
|
|
|
|
when the key or value of a given item
|
2017-11-20 03:24:08 +00:00
|
|
|
|
duplicates any existing item's.
|
2016-06-28 04:05:22 +00:00
|
|
|
|
These can take the following values:
|
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- :attr:`~bidict.DuplicationPolicy.RAISE`
|
|
|
|
|
- :attr:`~bidict.DuplicationPolicy.OVERWRITE`
|
|
|
|
|
- :attr:`~bidict.DuplicationPolicy.IGNORE`
|
2016-06-28 04:05:22 +00:00
|
|
|
|
|
2017-11-20 03:24:08 +00:00
|
|
|
|
``on_dup_kv`` can also take ``ON_DUP_VAL``.
|
2016-06-28 04:05:22 +00:00
|
|
|
|
|
|
|
|
|
If not provided,
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:func:`~bidict.bidict.put` uses the
|
|
|
|
|
:attr:`~bidict.DuplicationPolicy.RAISE` policy by default.
|
2016-06-28 04:05:22 +00:00
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- New :func:`~bidict.bidict.putall` method
|
|
|
|
|
provides a bulk :func:`~bidict.bidict.put` API,
|
2017-11-20 03:24:08 +00:00
|
|
|
|
allowing you to override the default duplication handling policy
|
2018-01-02 21:49:34 +00:00
|
|
|
|
that :func:`~bidict.bidict.update` uses.
|
2016-06-28 04:05:22 +00:00
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- :func:`~bidict.bidict.update` now fails clean,
|
|
|
|
|
so if an :func:`~bidict.bidict.update` call raises a
|
|
|
|
|
:class:`~bidict.DuplicationError`,
|
2016-07-04 03:29:24 +00:00
|
|
|
|
you can now be sure that none of the given items was inserted.
|
2016-06-28 04:05:22 +00:00
|
|
|
|
|
2016-07-04 03:29:24 +00:00
|
|
|
|
Previously, all of the given items that were processed
|
2016-06-28 04:05:22 +00:00
|
|
|
|
before the one causing the failure would have been inserted,
|
2016-07-04 03:29:24 +00:00
|
|
|
|
and no facility was provided to recover
|
|
|
|
|
which items were inserted and which weren't,
|
|
|
|
|
nor to revert any changes made by the failed
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:func:`~bidict.bidict.update` call.
|
2016-06-28 04:05:22 +00:00
|
|
|
|
The new behavior makes it easier to reason about and control
|
2018-01-02 21:49:34 +00:00
|
|
|
|
the effects of failed :func:`~bidict.bidict.update` calls.
|
2016-06-28 04:05:22 +00:00
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
The new :func:`~bidict.bidict.putall` method also fails clean.
|
2016-06-28 04:05:22 +00:00
|
|
|
|
|
2016-07-04 03:29:24 +00:00
|
|
|
|
Internally, this is implemented by storing a log of changes
|
|
|
|
|
made while an update is being processed, and rolling back the changes
|
|
|
|
|
when one of them is found to cause an error.
|
2017-11-16 20:44:51 +00:00
|
|
|
|
This required reimplementing :class:`orderedbidict <bidict.OrderedBidict>`
|
2016-07-04 03:29:24 +00:00
|
|
|
|
on top of two dicts and a linked list, rather than two OrderedDicts,
|
2018-01-02 21:49:34 +00:00
|
|
|
|
since :class:`~collections.OrderedDict` does not expose
|
|
|
|
|
its backing linked list.
|
2016-06-28 04:05:22 +00:00
|
|
|
|
|
2017-11-16 20:44:51 +00:00
|
|
|
|
- :func:`orderedbidict.move_to_end() <bidict.OrderedBidict.move_to_end>`
|
2016-07-04 03:29:24 +00:00
|
|
|
|
now works on Python < 3.2 as a result of the new
|
2017-11-16 20:44:51 +00:00
|
|
|
|
:class:`orderedbidict <bidict.OrderedBidict>` implementation.
|
2016-06-28 04:05:22 +00:00
|
|
|
|
|
|
|
|
|
- Add
|
|
|
|
|
|
|
|
|
|
- :func:`bidict.compat.viewkeys`
|
|
|
|
|
- :func:`bidict.compat.viewvalues`
|
|
|
|
|
- :func:`bidict.compat.iterkeys`
|
|
|
|
|
- :func:`bidict.compat.itervalues`
|
|
|
|
|
- :func:`bidict.compat.izip`
|
squashed changes for 0.13.0
- 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
2017-01-09 15:37:31 +00:00
|
|
|
|
- ``bidict.compat.izip_longest``
|
2016-06-28 04:05:22 +00:00
|
|
|
|
|
|
|
|
|
to complement the existing
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:func:`~bidict.compat.iteritems` and
|
|
|
|
|
:func:`~bidict.compat.viewitems`
|
2016-06-28 04:05:22 +00:00
|
|
|
|
compatibility helpers.
|
|
|
|
|
|
2016-07-04 03:29:24 +00:00
|
|
|
|
- More efficient implementations of
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:func:`~bidict.util.pairs`,
|
|
|
|
|
:func:`~bidict.util.inverted`, and
|
|
|
|
|
:func:`~bidict.frozenbidict.copy`.
|
2016-06-28 04:05:22 +00:00
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- Implement :func:`~bidict.frozenbidict.__copy__`
|
2016-06-28 04:05:22 +00:00
|
|
|
|
for use with the :mod:`copy` module.
|
|
|
|
|
|
2017-11-20 03:24:08 +00:00
|
|
|
|
- Fix issue preventing a client class from inheriting from ``loosebidict``
|
2016-06-28 04:05:22 +00:00
|
|
|
|
(see `#34 <https://github.com/jab/bidict/issues/34>`_).
|
|
|
|
|
|
|
|
|
|
- Add benchmarking to tests.
|
|
|
|
|
|
|
|
|
|
- Drop official support for CPython 3.3.
|
|
|
|
|
(It may continue to work, but is no longer being tested.)
|
|
|
|
|
|
|
|
|
|
Breaking API Changes
|
2017-11-16 20:44:51 +00:00
|
|
|
|
++++++++++++++++++++
|
2016-06-28 04:05:22 +00:00
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- Rename ``KeyExistsException`` to :class:`~bidict.KeyDuplicationError`
|
|
|
|
|
and ``ValueExistsException`` to :class:`~bidict.ValueDuplicationError`.
|
2016-07-04 03:29:24 +00:00
|
|
|
|
|
2017-11-16 20:44:51 +00:00
|
|
|
|
- When overwriting the key of an existing value in an :class:`orderedbidict <bidict.OrderedBidict>`,
|
2016-07-04 03:29:24 +00:00
|
|
|
|
the position of the existing item is now preserved,
|
|
|
|
|
overwriting the key of the existing item in place,
|
|
|
|
|
rather than moving the item to the end.
|
|
|
|
|
This now matches the behavior of overwriting the value of an existing key,
|
|
|
|
|
which has always preserved the position of the existing item.
|
|
|
|
|
(If inserting an item whose key duplicates that of one existing item
|
|
|
|
|
and whose value duplicates that of another,
|
|
|
|
|
the existing item whose value is duplicated is still dropped,
|
|
|
|
|
and the existing item whose key is duplicated
|
|
|
|
|
still gets its value overwritten in place, as before.)
|
|
|
|
|
|
|
|
|
|
For example::
|
|
|
|
|
|
2017-11-16 20:44:51 +00:00
|
|
|
|
>>> from bidict import orderedbidict # doctest: +SKIP
|
|
|
|
|
>>> o = orderedbidict([(0, 1), (2, 3)]) # doctest: +SKIP
|
|
|
|
|
>>> o.forceput(4, 1) # doctest: +SKIP
|
2016-07-04 03:29:24 +00:00
|
|
|
|
|
|
|
|
|
previously would have resulted in::
|
|
|
|
|
|
|
|
|
|
>>> o # doctest: +SKIP
|
|
|
|
|
orderedbidict([(2, 3), (4, 1)])
|
|
|
|
|
|
|
|
|
|
but now results in::
|
|
|
|
|
|
2017-11-16 20:44:51 +00:00
|
|
|
|
>>> o # doctest: +SKIP
|
2016-07-04 03:29:24 +00:00
|
|
|
|
orderedbidict([(4, 1), (2, 3)])
|
2016-06-28 04:05:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0.11.0 (2016-02-05)
|
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
|
|
- Add
|
2017-11-16 20:44:51 +00:00
|
|
|
|
:class:`orderedbidict <bidict.OrderedBidict>`,
|
2017-11-20 03:24:08 +00:00
|
|
|
|
``looseorderedbidict``, and
|
2017-11-16 20:44:51 +00:00
|
|
|
|
:class:`frozenorderedbidict <bidict.FrozenOrderedBidict>`.
|
2016-06-28 04:05:22 +00:00
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- Add :doc:`code-of-conduct`.
|
2016-06-28 04:05:22 +00:00
|
|
|
|
|
|
|
|
|
- Drop official support for pypy3.
|
|
|
|
|
(It still may work but is no longer being tested.
|
|
|
|
|
Support may be added back once pypy3 has made more progress.)
|
|
|
|
|
|
|
|
|
|
0.10.0.post1 (2015-12-23)
|
|
|
|
|
-------------------------
|
|
|
|
|
|
|
|
|
|
- Minor documentation fixes and improvements.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0.10.0 (2015-12-23)
|
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
|
|
- Remove several features in favor of keeping the API simpler
|
|
|
|
|
and the code more maintainable.
|
|
|
|
|
|
|
|
|
|
- In the interest of protecting data safety more proactively, by default
|
|
|
|
|
bidict now raises an error on attempting to insert a non-unique value,
|
|
|
|
|
rather than allowing its associated key to be silently overwritten.
|
|
|
|
|
See discussion in `#21 <https://github.com/jab/bidict/issues/21>`_.
|
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- New :meth:`~bidict.bidict.forceupdate` method
|
|
|
|
|
provides a bulk :meth:`~bidict.bidict.forceput` operation.
|
2016-06-28 04:05:22 +00:00
|
|
|
|
|
|
|
|
|
- Fix bugs in
|
2018-01-02 21:49:34 +00:00
|
|
|
|
:attr:`~bidict.bidict.pop` and
|
|
|
|
|
:attr:`~bidict.bidict.setdefault`
|
2016-06-28 04:05:22 +00:00
|
|
|
|
which could leave a bidict in an inconsistent state.
|
|
|
|
|
|
|
|
|
|
Breaking API Changes
|
2017-11-16 20:44:51 +00:00
|
|
|
|
++++++++++++++++++++
|
2016-06-28 04:05:22 +00:00
|
|
|
|
|
|
|
|
|
- Remove ``bidict.__invert__``, and with it, support for the ``~b`` syntax.
|
2018-01-02 21:49:34 +00:00
|
|
|
|
Use :attr:`~bidict.frozenbidict.inv` instead.
|
2016-06-28 04:05:22 +00:00
|
|
|
|
`#19 <https://github.com/jab/bidict/issues/19>`_
|
|
|
|
|
|
|
|
|
|
- Remove support for the slice syntax.
|
|
|
|
|
Use ``b.inv[val]`` rather than ``b[:val]``.
|
|
|
|
|
`#19 <https://github.com/jab/bidict/issues/19>`_
|
|
|
|
|
|
|
|
|
|
- Remove ``bidict.invert``.
|
2018-01-02 21:49:34 +00:00
|
|
|
|
Use :attr:`~bidict.frozenbidict.inv`
|
2016-06-28 04:05:22 +00:00
|
|
|
|
rather than inverting a bidict in place.
|
|
|
|
|
`#20 <https://github.com/jab/bidict/issues/20>`_
|
|
|
|
|
|
|
|
|
|
- Raise ``ValueExistsException``
|
|
|
|
|
when attempting to insert a mapping with a non-unique key.
|
|
|
|
|
`#21 <https://github.com/jab/bidict/issues/21>`_
|
|
|
|
|
|
2017-11-20 03:24:08 +00:00
|
|
|
|
- Rename ``collapsingbidict`` to ``loosebidict``
|
2016-06-28 04:05:22 +00:00
|
|
|
|
now that it suppresses
|
|
|
|
|
``ValueExistsException``
|
|
|
|
|
rather than the less general ``CollapseException``.
|
|
|
|
|
`#21 <https://github.com/jab/bidict/issues/21>`_
|
|
|
|
|
|
|
|
|
|
- ``CollapseException`` has been subsumed by
|
|
|
|
|
``ValueExistsException``.
|
|
|
|
|
`#21 <https://github.com/jab/bidict/issues/21>`_
|
|
|
|
|
|
2018-01-02 21:49:34 +00:00
|
|
|
|
- :meth:`~bidict.bidict.put` now raises ``KeyExistsException``
|
2016-06-28 04:05:22 +00:00
|
|
|
|
when attempting to insert an already-existing
|
|
|
|
|
key, and ``ValueExistsException`` when
|
|
|
|
|
attempting to insert an already-existing value.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0.9.0.post1 (2015-06-06)
|
|
|
|
|
------------------------
|
|
|
|
|
|
|
|
|
|
- Fix metadata missing in the 0.9.0rc0 release.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0.9.0rc0 (2015-05-30)
|
|
|
|
|
---------------------
|
|
|
|
|
|
2017-11-20 03:24:08 +00:00
|
|
|
|
- Add this changelog,
|
2016-06-28 04:05:22 +00:00
|
|
|
|
`Contributors' Guide <https://github.com/jab/bidict/blob/master/CONTRIBUTING.rst>`_,
|
|
|
|
|
`Gitter chat room <https://gitter.im/jab/bidict>`_,
|
|
|
|
|
and other community-oriented improvements.
|
|
|
|
|
|
|
|
|
|
- Adopt Pytest (thanks Tom Viner and Adopt Pytest Month).
|
|
|
|
|
|
2017-11-21 03:27:26 +00:00
|
|
|
|
- Add property-based tests via
|
2016-06-28 04:05:22 +00:00
|
|
|
|
`hypothesis <https://hypothesis.readthedocs.io>`_.
|
|
|
|
|
|
|
|
|
|
- Other code, tests, and docs improvements.
|
|
|
|
|
|
|
|
|
|
Breaking API Changes
|
2017-11-16 20:44:51 +00:00
|
|
|
|
++++++++++++++++++++
|
2016-06-28 04:05:22 +00:00
|
|
|
|
|
|
|
|
|
- Move ``bidict.iteritems`` and ``bidict.viewitems``
|
|
|
|
|
to new :mod:`bidict.compat` module.
|
|
|
|
|
|
|
|
|
|
- Move :class:`bidict.inverted`
|
2017-11-21 03:27:26 +00:00
|
|
|
|
to new :mod:`bidict.util` module
|
2016-06-28 04:05:22 +00:00
|
|
|
|
(still available from top-level :mod:`bidict` module as well).
|
|
|
|
|
|
|
|
|
|
- Move ``bidict.fancy_iteritems``
|
|
|
|
|
to :func:`bidict.util.pairs`
|
|
|
|
|
(also available from top level as :func:`bidict.pairs`).
|
|
|
|
|
|
|
|
|
|
- Rename ``bidict_type`` keyword arg to ``base_type``
|
|
|
|
|
in :func:`bidict.namedbidict`.
|