Commit Graph

48 Commits

Author SHA1 Message Date
jab d0c6fdae3b happy 2018 2017-12-31 22:51:19 -05:00
jab fc89808af7 docs 2017-12-17 13:58:57 -05:00
jab 50a1042f68 rm outdated caveat about reference cycles 2017-12-07 17:01:36 -05:00
jab fb32b56de1 Fix #24 + other improvements.
- 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.
2017-12-07 12:57:01 -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 7b4d1df5fb Add pre-commit hooks + changes to appease them 2017-11-21 10:35:56 -05:00
jab 64662b1bc0 travis and docs fixes 2017-11-20 23:07:47 -05:00
jab 51c75d2bb0 another round of refinements
- 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.
2017-11-20 22:27:27 -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 4b86b57689 docs tweaks 2017-11-17 23:54:56 -05:00
jab 22f4e78d09
numerous fixes and improvements (#43)
- .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
2017-11-17 22:35:40 -05:00
jab 033083ca26
various code and CI improvements + dependency updates (#42) 2017-11-16 15:44:51 -05:00
jab 050e61e0f7 update to latest deps; tests + docs improvements 2017-10-11 10:26:22 -04:00
jab 2a47714a21 docs: factor out versioneye prompt from changelog and include in readme too 2017-03-31 14:58:44 -04:00
jab 19f7e9f90a change license to MPLv2 2017-03-15 16:43:05 -04:00
jab 6f5dbd4d5b tweak @knaperek's improvements from #41 + thanks 2017-03-15 15:45:40 -04: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 b7815c5318 deps, docs linking fixes/improvements, skip benchmarking for now 2016-12-06 18:09:45 -05:00
jab 4b42d8dd3e pull out new "order matters" subsection of docs 2016-07-03 18:12:58 -04:00
jab c2fcc2be11 document effects of ordering on overwriting 2016-07-03 17:36:26 -04:00
jab 79228b78e3 squashed changes for 0.12.0 2016-06-28 00:05:23 -04:00
jab 2ec1bba8a7 bump version to 0.11.1.dev post-release
[ci skip]
2016-02-05 22:34:35 -05:00
jab 35d0e6bc78 prepare for 0.11.0 release 2016-02-05 22:27:30 -05:00
jab c4ae97dd8b several improvements to test setup
- 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
2016-01-26 19:28:43 -05:00
jab b1bff55987 tweak badges (including adding requires.io badge) 2016-01-13 11:52:26 -05:00
jab 2633febeaf adopt open code of conduct 2016-01-11 22:42:39 -05:00
jab 67c4d4ca77 happy 2016 2016-01-03 14:30:30 -05:00
jab 27160477ad add support for ordered bidict types 2015-12-25 14:13:03 -05:00
jab 0819e2c644 change version to 0.10.1.dev0 for development; update changelog 2015-12-23 12:27:08 -05:00
jab edb30ffaba change version to 0.10.0.post1 for release, update changelog 2015-12-23 12:21:42 -05:00
jab c2f975b5ff docs + badges tweaks
- add participation section to intro
- rm paypal, bountysource, and star badges from set of status badges
- docs badge now links to "stable" version
- add contributing to sphinx docs
- add favicon to sphinx docs
- fix logo and gumroad image urls
2015-12-23 12:16:19 -05:00
jab 8acaa62355 fix docs badge 2015-12-20 22:29:25 -05: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 ba156906d4 Merge pull request #25 from jab/drop-slice-syntax
drop support for slice and ~ syntax
2015-11-28 08:22:18 -05:00
jab cc479de4c4 logo, badges, docs, support via gumroad 2015-11-28 08:15:40 -05:00
jab b64b66301e add note about __del__ prior to python 3.4 2015-11-27 10:34:17 -05:00
jab 49d50aa82c drop support for slice and ~ syntax
closes #19
2015-11-25 17:52:54 -05:00
jab 356dbe3ec2 add reference to zen of python 2015-11-25 12:19:45 -05:00
jab d7551dbf67 remove bidict.invert
closes #20
2015-11-24 23:29:22 -05:00
jab 143cb86eeb document recommended dict-like check
closes #18
2015-10-10 15:06:13 -04:00
jab 5f40c86694 py35 2015-09-14 10:11:56 -04:00
jab ea545c7bf8 docs tweaks 2015-07-09 21:34:04 -04:00
jab e6dd75525a prepare 0.9.0rc0 2015-05-30 16:26:28 -04:00
jab 34ae95f926 increase test coverage, fix compare to OrderedDict 2015-05-26 12:29:48 -04:00
jab b84561b94c tweak changelog, readme, missing bidicts in stdlib 2015-04-30 14:49:31 -04:00
jab dc56464fd6 docs improvements 2015-04-27 18:20:04 -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
jab a409c25525 moving from hg to git, cutting 0.2.1 2014-09-23 10:08:21 -04:00