• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jab / bidict / 549
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: dev
DEFAULT BRANCH: master
Ran 11 Jun 2016 02:48AM UTC
Jobs 2
Files 9
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
549

push

travis-ci

jab
squashed changes for 0.12.0

- Add benchmarking to tests, and implement several functions more efficiently
  (including pairs(), inverted(), and bidict.copy()).

- put() now accepts on_dup_key, on_dup_val, and on_dup_kv kwargs
  which allow you to override the default behavior
  when the key and/or value of a given item
  duplicate those/that of any existing item(s).
  These can take the following values:

  - bidict.DuplicationBehavior.RAISE
  - bidict.DuplicationBehavior.OVERWRITE
  - bidict.DuplicationBehavior.IGNORE

  For a bidict, on_dup_key defaults to OVERWRITE,
  while on_dup_val and on_dup_kv default to RAISE.
  For a loosebidict, all default OVERWRITE,
  maintaining backwards compatibility with the previous behavior
  when called with no keyword arguments.

- New putall() method provides a bulk put() API,
  additionally accepting a precheck kwarg (see below).

- Make initialization and bulk insert operations safer and more predictable
  by checking for and processing items with duplicate keys and values
  ahead of inserting any of the given items, by default.
  So e.g. if a ValueNotUniqueError is raised by an update() call,
  you can be sure that none of the given items were inserted.
  This default behavior can be overridden when calling
  putall() by passing precheck=False.
  Note: loosebidict defaults to precheck=False for these operations.

- New exceptions, reflecting new cases where they're raised:

  - KeyNotUniqueError
  - ValueNotUniqueError
  - KeyAndValueNotUniqueError
  - UniquenessError (base class for the above)

- Drop official support for CPython 3.3
  (it will probably continue to work but is no longer being tested).

- Fix issue preventing a client class from inheriting from loosebidict (#34).

- Add

  - bidict.compat.viewkeys()
  - bidict.compat.viewvalues()
  - bidict.compat.iterkeys()
  - bidict.compat.itervalues()
  - bidict.compat.izip()
  - bidict.compat.izip_longest()

  to complement the existing iteritems() and viewitems() compatibility helpers.

- Implement __copy__ for use with the `copy` module.

Breaking API Changes
--------------------

Rename KeyExistsException KeyNotUniqueError and ValueExistsException
ValueNotUniqueError.

290 of 296 relevant lines covered (97.97%)

1.96 hits per line

Jobs
ID Job ID Ran Files Coverage
1 549.1 (PYENV_PYTHON_VER=2.7.11) 11 Jun 2016 02:48AM UTC 0
97.64
Travis Job 549.1
3 549.3 (PYENV_PYTHON_VER=3.5.1) 11 Jun 2016 02:50AM UTC 0
97.97
Travis Job 549.3
Source Files on build 549
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #549
  • cbff8846 on github
  • Prev Build on dev (#547)
  • Next Build on dev (#551)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc