Sortedcontainers

Latest version: v2.4.0

Safety actively analyzes 630217 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 7

1.4.2

------------------

**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``.

0.9.6

------------------

**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.

0.9.5

------------------

**API Changes**

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

0.9.4

------------------

**Bugfixes**

* Added implementation and testing for Python pickle module.

0.9.3

------------------

**API Changes**

* Removed ``SortedListWithKeyPair`` type.

**Improvements**

* Changed type references to ``self.__class__`` as able.

0.9.2

------------------

**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.

Page 5 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.