Commit Graph

13 Commits

Author SHA1 Message Date
Joshua Bronson b5c9f346ce (c) 2022-02-15 15:37:25 -05:00
Joshua Bronson 03d6cbc118 Compute inverse lazily, automatically add or remove __reversed__ implementations for BidictBase subclasses based on whether their backing mappings are reversible, improve mechanism for automatic dynamic generation of inverse bidict classes and use this for namedbidict, improve pickling. 2022-02-06 12:28:12 -05:00
jab bfb6ed2a3b finish refactoring, misc. bugfixes, improve docs + tests 2018-02-28 00:09:57 +11:00
jab 459f9365cf improve test coverage 2018-02-19 18:53:03 +11:00
jab d0c6fdae3b happy 2018 2017-12-31 22:51:19 -05:00
jab ea93911f93 numerous improvements
- 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.
2017-12-06 14:22:32 -05:00
jab 64ed7278d8
more API and code improvements
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
2017-11-19 22:24:08 -05:00
jab 033083ca26
various code and CI improvements + dependency updates (#42) 2017-11-16 15:44:51 -05:00
jab 887e078907 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 10:37:31 -05:00
jab 79228b78e3 squashed changes for 0.12.0 2016-06-28 00:05:23 -04:00
jab 2074f4b0d8 implement stricter 1-to-1 checking + many fixes + improvements
See the changelog for full details.

Closes #21.
2015-12-20 22:05:22 -05:00
jab 34ae95f926 increase test coverage, fix compare to OrderedDict 2015-05-26 12:29:48 -04:00
jab fe7e7217cb refactor, tests + docs improvements
- break up single bidict.py module into multiple separate modules inside
  "bidict" package
  - new bidict.util and bidict.compat modules
  - move/rename bidict.fancy_iteritems to bidict.util.pairs
  - move bidict.iteritems and bidict.viewitems to bidict.compat
- condense docstrings by moving more documentation into separate sphinx pages
  in "docs" dir and doctests into separate files in new "tests" dir
- initial work on property-based testing using hypothesis
- adopt pytest
- bump to 0.9.0-dev
2015-04-27 11:08:27 -04:00