Changelog History
Page 2
-
v0.18.2 Changes
September 08, 2019๐ Please see https://bidict.readthedocs.io/en/v0.18.2/changelog.html for the changes in this release.
-
v0.18.1 Changes
September 03, 2019- ๐ Fix a regression introduced by the memory optimizations added in 0.15.0
which caused
:func:
deepcopied <copy.deepcopy>
and :func:unpickled <pickle.loads>
bidicts to have their inverses set incorrectly.#94 <https://github.com/jab/bidict/issues/94>
__
- ๐ Fix a regression introduced by the memory optimizations added in 0.15.0
which caused
:func:
-
v0.18.0 Changes
February 14, 2019๐ Rename
bidict.BidirectionalMapping.inv
to :attr:~bidict.BidirectionalMapping.inverse
and make :attr:bidict.BidictBase.inv
an alias for :attr:~bidict.BidictBase.inverse
.#86 <https://github.com/jab/bidict/issues/86>
__:meth:
bidict.BidirectionalMapping.__subclasshook__
now requires aninverse
attribute rather than aninv
attribute for a class to qualify as a virtual subclass. This breaking change is expected to affect few if any users.โ Add Python 2/3-compatible :attr:
bidict.compat.collections_abc
alias.โ Stop testing Python 3.4 on CI, and warn when Python 3 < 3.5 is detected rather than Python 3 < 3.3.
Python 3.4 reaches
end of life <https://www.python.org/dev/peps/pep-0429/>
__ on 2019-03-18. As of January 2019, 3.4 represents only about 3% of bidict downloads onPyPI Stats <https://pypistats.org/packages/bidict>
__. -
v0.17.5 Changes
November 19, 2018๐ Improvements to performance and delegation logic, with minor breaking changes to semi-private APIs.
- Remove the
__delegate__
instance attribute added in the previous release. It was overly general and not worth the cost.
Instead of checking
self.__delegate__
and delegating accordingly each time a possibly-delegating method is called, revert back to using "delegated-to-fwdm" mixin classes (now found inbidict._delegating_mixins
), and resurrect a mutable bidict parent class that omits the mixins as :class:bidict.MutableBidict
.- Rename
__repr_delegate__
to :class:~bidict.BidictBase._repr_delegate
.
- Remove the
-
v0.17.4 Changes
November 14, 2018Minor code, interop, and (semi-)private API improvements.
- :class:
~bidict.OrderedBidict
optimizations and code improvements.
Use
bidict
\s for the backing_fwdm
and_invm
mappings, obviating the need to store key and value data in linked list nodes.- ๐จ Refactor proxied- (i.e. delegated-) to-
_fwdm
logic for better composability and interoperability.
Drop the
_Proxied*
mixin classes and instead move their methods into :class:~bidict.BidictBase
, which now checks for an object defined by theBidictBase.__delegate__
attribute. TheBidictBase.__delegate__
object will be delegated to if the method is available on it, otherwise a default implementation (e.g. inherited from :class:~collections.abc.Mapping
) will be used otherwise. Subclasses may set__delegate__ = None
to opt out.Consolidate
_MutableBidict
into :class:bidict.bidict
now that the dropped mixin classes make it unnecessary.Change
__repr_delegate__
to simply take a type like :class:dict
or :class:list
.โฌ๏ธ Upgrade to latest major
sortedcontainers <https://github.com/grantjenks/python-sortedcontainers>
__ version (from v1 to v2) for the :ref:extending:\
`SortedBidict`` Recipes`.bidict.compat.{view,iter}{keys,values,items}
on Python 2 no longer assumes the target object implements these methods, as they're not actually part of the :class:~collections.abc.Mapping
interface, and provides fallback implementations when the methods are unavailable. This allows the :ref:extending:\
`SortedBidict`` Recipes` to continue to work with sortedcontainers v2 on Python 2.
- :class:
-
v0.17.3 Changes
September 18, 2018๐ Improve packaging by adding a pyproject.toml and by including more supporting files in the distribution.
#81 <https://github.com/jab/bidict/pull/81>
__โฌ๏ธ Drop pytest-runner and support for running tests via
python setup.py test
in preference topytest
orpython -m pytest
.
-
v0.17.2 Changes
April 30, 2018Memory usage improvements +++++++++++++++++++++++++
- ๐ Use less memory in the linked lists that back
:class:
~bidict.OrderedBidict
\s by storing node data unpacked rather than in (key, value) tuple objects.
- ๐ Use less memory in the linked lists that back
:class:
-
v0.17.1 Changes
April 28, 2018๐ Bugfix Release ++++++++++++++
๐ Fix a regression in 0.17.0 that could cause erroneous behavior โก๏ธ when updating items of an :class:
~bidict.Orderedbidict
's inverse, e.g.some_ordered_bidict.inv[foo] = bar
. -
v0.17.0 Changes
April 25, 2018Speedups and memory usage improvements ++++++++++++++++++++++++++++++++++++++
Pass :meth:
~bidict.bidict.keys
, :meth:~bidict.bidict.values
, and :meth:~bidict.bidict.items
calls (as well as theiriter*
andview*
counterparts on Python 2) through to the backing_fwdm
and_invm
dicts so that they run as fast as possible (i.e. at C speed on CPython), rather than using the slower implementations inherited from :class:collections.abc.Mapping
.๐ Use weakrefs in the linked lists that back :class:
~bidict.OrderedBidict
\s to avoid creating strong reference cycles.
Memory for an ordered bidict that you create can now be reclaimed in CPython as soon as you no longer hold any references to it, rather than having to wait until the next garbage collection.
#71 <https://github.com/jab/bidict/pull/71>
__Misc ++++
- ๐ Add :attr:
bidict.__version_info__
attribute to complement :attr:bidict.__version__
.
-
v0.16.0 Changes
April 06, 2018Minor code and efficiency improvements to :func:
~bidict.inverted
and :func:~bidict._util._iteritems_args_kw
(formerlybidict.pairs()
).Minor Breaking API Changes ++++++++++++++++++++++++++
The following breaking changes are expected to affect few if any users.
- Rename
bidict.pairs()
โ :func:bidict._util._iteritems_args_kw
.
- Rename