Skip to content

Latest commit

 

History

History
506 lines (350 loc) · 14.9 KB

HISTORY.rst

File metadata and controls

506 lines (350 loc) · 14.9 KB

Sorted Containers Release History

.. currentmodule:: sortedcontainers

Bugfixes

  • Make sort order stable when updating with large iterables.

Miscellaneous

  • Add "small slice" optimization to SortedList.__getitem__.
  • Silence warning when testing SortedList.iloc.

Miscellaneous

  • Fix a warning regarding classifiers in setup.py.

Miscellaneous

  • Change SortedDict to avoid cycles for CPython reference counting.

Miscellaneous

  • Small updates to docs and tests for Python 3.7.

Bugfixes

  • Change imports for Abstract Base Classes to collections.abc to avoid warnings in Python 3.7.

Bugfixes

  • SortedDict methods iterkeys, iteritems, itervalues, viewkeys, viewitems, and viewvalues are not implemented for Python 2. Attribute lookup now raises :exc:`AttributeError`.

API Changes

  • Accessing SortedDict.iloc will emit DeprecationWarning.

Bugfixes

Miscellaneous

  • The source distribution no longer contains the docs and tests directories. If you need these, then please download an archive from Github. Version control is tagged with the version released to PyPI.

API Changes

  • Add SortedDict.iloc for improved backwards compatibility with version 1.

Miscellaneous

  • Rename Github repo from grantjenks/sorted_containers to grantjenks/python-sortedcontainers.
  • Fix broken links in documentation.

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.

API Changes

Miscellaneous

  • Sphinx autodoc now used for API documentation.
  • All benchmarks now run on CPython 3.6 unless otherwise noted.
  • Testing now uses pytest rather than nose.
  • AppVeyor CI testing added.
  • Updated versions of alternative implementations.

Miscellaneous

  • Improved performance of irange(...) and islice(...) methods.

Miscellaneous

  • Dropped CPython 2.6 testing.

Bugfixes

  • Added SortedList.reverse to override MutableSequence.reverse and raise NotImplementedError.

Bugfixes

  • Changed SortedList.__setitem__ to support slices with stop less than start and step equal one.

Bugfixes

  • Changed SortedList.__setitem__ to support slices that alias itself.

Bugfixes

  • Changed SortedList.extend to support empty iterables.

Bugfixes

  • Changed SortedList.__new__ to call SortedListWithKey.__init__ once instead of twice.

Miscellaneous

  • Updated documentation with PyCon 2016 Talk.

API Changes

  • Added SortedDict.peekitem method.

Miscellaneous

  • Added support for PyLint and minor source changes.
  • Dropped Python 3.2 support from tox testing due to virtualenv limitations.

Miscellaneous

  • Added Performance at Scale documentation.

Miscellaneous

  • Updated documentation with SF Python 2015 Holiday Meetup Talk.

API Changes

  • Changed SortedList initializer to support key-argument callable and automatically return SortedListWithKey when present.
  • Changed SortedListWithKey to inherit from SortedList.
  • Changed SortedSet.__ior__ to call update rather than union.
  • Changed SortedList comparison to match Sequence semantics as described in CPython Language Reference Section 5.9.
  • Changed SortedSet comparison to raise NotImplemented on type mismatch.
  • Removed SortedList.as_list method. Use list(sorted_list) instead.
  • Removed SortedList._slice method. Use slice.indices instead.
  • Added private references to public methods for internal use to ease method over-loading.

Bugfixes

  • Changed sorteddict.ValuesView.count to correctly reference sorted dictionary.

Improvements

  • SortedList.__getitem__ now 35% faster for indexing at beginning and end.
  • SortedList.pop now 35% faster by inlining fast-paths.
  • del sorted_list[:] now calls clear and is much faster.
  • sorted_list[:] = values now calls clear and update and is much faster.

Miscellaneous

  • Added Python 3.5 support in tox testing.
  • Added discussion of ruamel.ordereddict.sorteddict to performance documentation.
  • Merged file sortedlistwithkey.py into sortedlist.py.

API Changes

  • Added islice method to sorted list, dict, and set types.
  • Added irange and irange_key method to sorted list, dict, and set types.

API Changes

  • Added bisect_key methods to sorted list, dict, and set types.
  • Added last=True argument to SortedDict.popitem.

Bugfixes

  • Added implementation and testing for Python pickle module.

API Changes

  • Removed SortedListWithKeyPair type.

Improvements

  • Changed type references to self.__class__ as able.

API Changes

  • Removed value_orderable argument from SortedListWithKey initializer.
  • Added key-callable argument to SortedDict initializer.
  • Added key-callable argument to SortedSet initializer.

Improvements

  • Changed SortedDict to inherit directly from dict.

Miscellaneous

  • Added PyPy3 support to tox testing.
  • Added SortedListWithKey to sorted list performance comparison documentation.

Bugfixes

  • Changed SortedList.__setitem__ with slices to correctly update internal "maxes" index.

API Changes

  • Added __ior__, __iand__, __isub__, and __ixor__ methods to SortedSet interface.

Improvements

  • Changed position-based indexing to use dense tree-based index.

Miscellaneous

  • Added workload-based performance comparison for sorted list: Priority Queue, Multiset, etc.

Bugfixes

  • Changed copy methods to make shallow copies: values are not copied, only references to values are copied.

Miscellaneous

  • Added load-factor performance comparison documentation.

API Changes

  • Added value_orderable parameter to SortedListWithKey to support incomparable value types.

Bugfixes

  • Changed repr methods to prevent infinite recursion and allow easier subclassing.

Miscellaneous

  • Added more testing for sorted lists with key-callable argument.

API Changes

  • Added SortedListWithKey type with implementation based on (key, value) tuples.

Bugfixes

  • Added contains-key check in sorted dict equality comparisons.

Miscellaneous

  • Added Python runtime comparison to documentation.
  • Added sorted dict and set comparison to benchmark documentation.
  • Added Travis-CI testing.

API Changes

  • Added bisect methods from SortedList to SortedDict interface.

Miscellaneous

  • Added Banyan module to benchmark documentation.

Miscellaneous

  • Added testing support for CPython 2.6, 2.7, 3.2, and 3.3 with full coverage.
  • Initial release of sorted list, dict, and set types.