ANN: Sorted Containers 2.0.3 Released

Grant Jenks grant.jenks at
Thu May 31 15:40:57 EDT 2018

Announcing the release of Sorted Containers version 2.0.3

What is Sorted Containers?

Sorted Containers is an Apache2-licensed, pure-Python implementation of
sorted list, sorted dict, and sorted set data types that is fast-as-C
implementations with 100% code coverage and hours of stress testing. The
project is fully documented with performance benchmarks and comparisons to
alternative implementations.

What's new in 2.0.3?

Version 2 represents a significant update to the source base. The code has
been refactored and modernized to embrace Python 3 semantics while also
using `autodoc` in Sphinx for more maintainable documentation. The core
design and algorithms are all the same. Sorted Containers still supports and
is tested on Python 2 but primary development is now on Python 3.6.

Version 2 is developed on the `master` branch in the source repository and
Version 1 of Sorted Containers will be maintained on branch `v1`.

Version 3 of Sorted Containers will be released sometime after January 1,
2020 and will drop support for Python 2.

At a high-level, changes can be categorized in three ways:

1. :class:`SortedList` methods `__setitem__`, `append`, `extend`, and
   `insert` all now raise :exc:`NotImplementedError`. Use `add` or `update`
   instead. Though it's possible to implement these methods, they were
   confusing, inefficient and wrongly used by some users. Sorted list
   implementations that need the functionality are encouraged to do so
   through subclassing. Branch `v1` contains a reference implementation.

2. :class:`SortedDict` now uses Python 3 semantics for dict views. The
   `iterkeys`, `iteritems`, `itervalues`, `viewkeys`, `viewitems`, and
   `viewvalues` methods have all been removed. Use the `keys`, `items`, or
   `values` methods which now return sorted dict
   views. :class:`SortedKeysView` has also replaced `SortedDict.iloc` as a
   better interface for indexing.

3. Method parameter names have changed to be more consistent with Python's
   built-in data types: `val` has changed to `value`, `idx` has changed to
   `index`, and `that` has changed to `other`.

For a detailed list of changes, see the Release History at:

The introduction now includes a section on migrating from version 1 as well
as from other projects:


- Documentation:
- Download:
- Source:
- Issues:

This release is mostly backwards-compatible. Please upgrade.

More information about the Python-announce-list mailing list