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

jab / bidict / 549 / 1
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: dev
DEFAULT BRANCH: master
Ran 11 Jun 2016 02:48AM UTC
Files 9
Run time 0s
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

11 Jun 2016 02:43AM UTC coverage: 97.635%. Remained the same
PYENV_PYTHON_VER=2.7.11

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.

289 of 296 relevant lines covered (97.64%)

0.98 hits per line

Source Files on job 549.1 (PYENV_PYTHON_VER=2.7.11)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 549
  • Travis Job 549.1
  • cbff8846 on github
  • Prev Job for PYENV_PYTHON_VER=2.7.11 on dev (#547.1)
  • Next Job for PYENV_PYTHON_VER=2.7.11 on dev (#551.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc