Debian Codegraph @

HISTORY.rst

raw
1 Sorted Containers Release History
2 =================================
3
4 .. contents::
5 :depth: 1
6 :local:
7
8 .. currentmodule:: sortedcontainers
9
10 2.4.0 (2021-05-16)
11 ------------------
12
13 **API Changes**
14
15 * Implement SortedDict methods: __or__, __ror__, and __ior__ per PEP 584.
16
17 2.3.0 (2020-11-08)
18 ------------------
19
20 **Bugfixes**
21
22 * Make sort order stable when updating with large iterables.
23
24 2.2.2 (2020-06-07)
25 ------------------
26
27 **Miscellaneous**
28
29 * Add "small slice" optimization to `SortedList.__getitem__`.
30 * Silence warning when testing `SortedList.iloc`.
31
32 2.2.1 (2020-06-06)
33 ------------------
34
35 **Miscellaneous**
36
37 * Fix a warning regarding `classifiers` in setup.py.
38
39 2.2.0 (2020-06-06)
40 ------------------
41
42 **Miscellaneous**
43
44 * Change SortedDict to avoid cycles for CPython reference counting.
45
46 2.1.0 (2018-11-21)
47 ------------------
48
49 **Miscellaneous**
50
51 * Small updates to docs and tests for Python 3.7.
52
53 2.0.5 (2018-09-03)
54 ------------------
55
56 **Bugfixes**
57
58 * Change imports for Abstract Base Classes to `collections.abc` to avoid
59 warnings in Python 3.7.
60
61 2.0.4 (2018-06-06)
62 ------------------
63
64 **Bugfixes**
65
66 * `SortedDict` methods `iterkeys`, `iteritems`, `itervalues`, `viewkeys`,
67 `viewitems`, and `viewvalues` are not implemented for Python 2. Attribute
68 lookup now raises :exc:`AttributeError`.
69
70 2.0.3 (2018-05-31)
71 ------------------
72
73 **API Changes**
74
75 * Accessing `SortedDict.iloc` will emit `DeprecationWarning`.
76
77 **Bugfixes**
78
79 * `SortedSet.__rsub__` erroneously reversed its arguments. The method has been
80 removed in favor of the inherited `Set.__rsub__` which has a correct
81 implementation.
82 * :class:`SortedKeysView` and :class:`SortedValuesView` set-operations now
83 return :class:`SortedSet` objects to better match the semantics of version 1.
84
85 **Miscellaneous**
86
87 * The source distribution no longer contains the `docs` and `tests`
88 directories. If you need these, then please download an archive from
89 Github. Version control is tagged with the version released to PyPI.
90
91 2.0.2 (2018-05-21)
92 ------------------
93
94 **API Changes**
95
96 * Add `SortedDict.iloc` for improved backwards compatibility with version 1.
97
98 2.0.1 (2018-05-18)
99 ------------------
100
101 **Miscellaneous**
102
103 * Rename Github repo from `grantjenks/sorted_containers` to
104 `grantjenks/python-sortedcontainers`.
105 * Fix broken links in documentation.
106
107 .. _v2:
108
109 2.0.0 (2018-05-18)
110 ------------------
111
112 Version 2 represents a significant update to the source base. The code has been
113 refactored and modernized to embrace Python 3 semantics while also using
114 `autodoc` in Sphinx for more maintainable documentation. The core design and
115 algorithms are all the same. Sorted Containers still supports and is tested on
116 Python 2 but primary development is now on Python 3.6.
117
118 Version 2 is developed on the `master` branch in the source repository and
119 Version 1 of Sorted Containers will be maintained on branch `v1`.
120
121 Version 3 of Sorted Containers will be released sometime after January 1, 2020
122 and will drop support for Python 2.
123
124 At a high-level, changes can be categorized in three ways:
125
126 1. :class:`SortedList` methods `__setitem__`, `append`, `extend`, and `insert`
127 all now raise :exc:`NotImplementedError`. Use `add` or `update`
128 instead. Though it's possible to implement these methods, they were
129 confusing, inefficient and wrongly used by some users. Sorted list
130 implementations that need the functionality are encouraged to do so through
131 subclassing. Branch `v1` contains a reference implementation.
132 2. :class:`SortedDict` now uses Python 3 semantics for dict views. The
133 `iterkeys`, `iteritems`, `itervalues`, `viewkeys`, `viewitems`, and
134 `viewvalues` methods have all been removed. Use the `keys`, `items`, or
135 `values` methods which now return sorted dict views. :class:`SortedKeysView`
136 has also replaced `SortedDict.iloc` as a better interface for indexing.
137 3. Method parameter names have changed to be more consistent with Python's
138 built-in data types: `val` has changed to `value`, `idx` has changed to
139 `index`, and `that` has changed to `other`.
140
141 **API Changes**
142
143 * :class:`SortedListWithKey` is deprecated. Use :class:`SortedKeyList` instead.
144 The name `SortedListWithKey` remains as an alias for `SortedKeyList`. The
145 alias will be removed in Version 3.
146 * `sortedcontainers.sortedlist.LOAD` has moved to
147 `SortedList.DEFAULT_LOAD_FACTOR` so that derived classes can customize the
148 value.
149 * `SortedList._half` and `SortedList._dual` have been removed. Use
150 `SortedList._load` instead.
151 * :func:`SortedList.add` parameter `val` renamed to `value`.
152 * :func:`SortedList.__contains__` parameter `val` renamed to `value`.
153 * :func:`SortedList.discard` parameter `val` renamed to `value`.
154 * :func:`SortedList.remove` parameter `val` renamed to `value`.
155 * :func:`SortedList.__delitem__` parameter `idx` renamed to `index`.
156 * :func:`SortedList.__getitem__` parameter `idx` renamed to `index`.
157 * :func:`SortedList.__setitem__` now raises :exc:`NotImplementedError`. Use
158 :func:`SortedList.__delitem__` and :func:`SortedList.add` instead.
159 * :func:`SortedList.bisect_left` parameter `val` renamed to `value`.
160 * :func:`SortedList.bisect_right` parameter `val` renamed to `value`.
161 * :func:`SortedList.bisect` parameter `val` renamed to `value`.
162 * :func:`SortedList.count` parameter `val` renamed to `value`.
163 * :func:`SortedList.append` now raises :exc:`NotImplementedError`. Use
164 :func:`SortedList.add` instead.
165 * :func:`SortedList.extend` now raises :exc:`NotImplementedError`. Use
166 :func:`SortedList.update` instead.
167 * :func:`SortedList.insert` now raises :exc:`NotImplementedError`. Use
168 :func:`SortedList.add` instead.
169 * :func:`SortedList.pop` parameter `idx` renamed to `index`.
170 * :func:`SortedList.index` parameter `val` renamed to `value`.
171 * :func:`SortedList.__add__` parameter `that` renamed to `other`.
172 * :func:`SortedList.__iadd__` parameter `that` renamed to `other`.
173 * :func:`SortedList.__mul__` parameter `that` renamed to `num`.
174 * :func:`SortedList.__imul__` parameter `that` renamed to `num`.
175 * `SortedList._make_cmp` renamed to `SortedList.__make_cmp`.
176 * :func:`SortedKeyList.add` parameter `val` renamed to `value`.
177 * :func:`SortedKeyList.__contains__` parameter `val` renamed to `value`.
178 * :func:`SortedKeyList.discard` parameter `val` renamed to `value`.
179 * :func:`SortedKeyList.remove` parameter `val` renamed to `value`.
180 * :func:`SortedKeyList.bisect_left` parameter `val` renamed to `value`.
181 * :func:`SortedKeyList.bisect_right` parameter `val` renamed to `value`.
182 * :func:`SortedKeyList.bisect` parameter `val` renamed to `value`.
183 * :func:`SortedKeyList.count` parameter `val` renamed to `value`.
184 * :func:`SortedKeyList.append` now raises :exc:`NotImplementedError`. Use
185 :func:`SortedKeyList.add` instead.
186 * :func:`SortedKeyList.extend` now raises :exc:`NotImplementedError`. Use
187 :func:`SortedKeyList.update` instead.
188 * :func:`SortedKeyList.insert` now raises :exc:`NotImplementedError`. Use
189 :func:`SortedKeyList.add` instead.
190 * :func:`SortedKeyList.index` parameter `val` renamed to `value`.
191 * :func:`SortedKeyList.__add__` parameter `that` renamed to `other`.
192 * :func:`SortedKeyList.__radd__` added.
193 * :func:`SortedKeyList.__iadd__` parameter `that` renamed to `other`.
194 * :func:`SortedKeyList.__mul__` parameter `that` renamed to `num`.
195 * :func:`SortedKeyList.__rmul__` added.
196 * :func:`SortedKeyList.__imul__` parameter `that` renamed to `num`.
197 * Removed `SortedDict.iloc`. Use :func:`SortedDict.keys` and
198 :class:`SortedKeysView` instead.
199 * :func:`SortedDict.fromkeys` parameter `seq` renamed to `iterable`.
200 * :func:`SortedDict.keys` now returns :class:`SortedKeysView`.
201 * :func:`SortedDict.items` now returns :class:`SortedItemsView`.
202 * :func:`SortedDict.values` now returns :class:`SortedValuesView`.
203 * Removed `SortedDict.viewkeys`. Use :func:`SortedDict.keys` instead.
204 * Removed `SortedDict.viewitems`. Use :func:`SortedDict.items` instead.
205 * Removed `SortedDict.viewvalues`. Use :func:`SortedDict.values` instead.
206 * `SortedDict.iterkeys` removed. Use :func:`SortedDict.keys` instead.
207 * `SortedDict.iteritems` removed. Use :func:`SortedDict.items` instead.
208 * `SortedDict.itervalues` removed. Use :func:`SortedDict.values` instead.
209 * `SortedDict.popitem` now accepts an optional `index` argument. Default
210 ``-1``.
211 * `sorteddict.KeysView` renamed to :class:`SortedKeysView`.
212 * `sorteddict.ItemsView` renamed to :class:`SortedItemsView`.
213 * `sorteddict.ValuesView` renamed to :class:`SortedValuesView`.
214 * Sorted dict views rely on collections abstract base classes: dict views and
215 sequence. The :func:`SortedKeysView.__getitem__`,
216 :func:`SortedItemsView.__getitem__`, and :func:`SortedValuesView.__getitem__`
217 methods are implemented and optimized. All other mixin methods use the
218 default implementation provided by the base class. Prefer :class:`SortedDict`
219 methods to view methods when possible.
220 * `SortedSet._make_cmp` renamed to `SortedSet.__make_cmp`.
221 * :func:`SortedSet.symmetric_difference` parameter `that` renamed to `other`.
222 * :func:`SortedSet.symmetric_difference_update` parameter `that` renamed to
223 `other`.
224
225 **Miscellaneous**
226
227 * Sphinx `autodoc` now used for API documentation.
228 * All benchmarks now run on CPython 3.6 unless otherwise noted.
229 * Testing now uses `pytest` rather than `nose`.
230 * AppVeyor CI testing added.
231 * Updated versions of alternative implementations.
232
233 1.5.10 (2018-04-21)
234 -------------------
235
236 **Miscellaneous**
237
238 * Improved performance of irange(...) and islice(...) methods.
239
240 1.5.9 (2017-12-08)
241 ------------------
242
243 **Miscellaneous**
244
245 * Dropped CPython 2.6 testing.
246
247 1.5.8 (2017-12-08)
248 ------------------
249
250 **Bugfixes**
251
252 * Added ``SortedList.reverse`` to override ``MutableSequence.reverse`` and
253 raise ``NotImplementedError``.
254
255 1.5.7 (2016-12-22)
256 ------------------
257
258 **Bugfixes**
259
260 * Changed ``SortedList.__setitem__`` to support slices with stop less than
261 start and step equal one.
262
263 1.5.6 (2016-12-09)
264 ------------------
265
266 **Bugfixes**
267
268 * Changed ``SortedList.__setitem__`` to support slices that alias itself.
269
270
271 1.5.5 (2016-12-05)
272 ------------------
273
274 **Bugfixes**
275
276 * Changed ``SortedList.extend`` to support empty iterables.
277
278 1.5.4 (2016-10-16)
279 ------------------
280
281 **Bugfixes**
282
283 * Changed ``SortedList.__new__`` to call ``SortedListWithKey.__init__`` once
284 instead of twice.
285
286 1.5.3 (2016-06-01)
287 ------------------
288
289 **Miscellaneous**
290
291 * Updated documentation with PyCon 2016 Talk.
292
293 1.5.2 (2016-05-28)
294 ------------------
295
296 **API Changes**
297
298 * Added ``SortedDict.peekitem`` method.
299
300 1.5.1 (2016-05-26)
301 ------------------
302
303 **Miscellaneous**
304
305 * Added support for PyLint and minor source changes.
306 * Dropped Python 3.2 support from tox testing due to virtualenv limitations.
307
308 1.5.0 (2016-05-26)
309 ------------------
310
311 **Miscellaneous**
312
313 * Added Performance at Scale documentation.
314
315 1.4.3 (2015-12-03)
316 ------------------
317
318 **Miscellaneous**
319
320 * Updated documentation with SF Python 2015 Holiday Meetup Talk.
321
322 1.4.2 (2015-10-20)
323 ------------------
324
325 **API Changes**
326
327 * Changed ``SortedList`` initializer to support key-argument callable and
328 automatically return ``SortedListWithKey`` when present.
329 * Changed ``SortedListWithKey`` to inherit from ``SortedList``.
330 * Changed ``SortedSet.__ior__`` to call `update` rather than `union`.
331 * Changed SortedList comparison to match Sequence semantics as described in
332 CPython Language Reference Section 5.9.
333 * Changed SortedSet comparison to raise NotImplemented on type mismatch.
334 * Removed SortedList.as_list method. Use ``list(sorted_list)`` instead.
335 * Removed SortedList._slice method. Use ``slice.indices`` instead.
336 * Added private references to public methods for internal use to ease
337 method over-loading.
338
339 **Bugfixes**
340
341 * Changed sorteddict.ValuesView.count to correctly reference sorted dictionary.
342
343 **Improvements**
344
345 * ``SortedList.__getitem__`` now 35% faster for indexing at beginning and end.
346 * ``SortedList.pop`` now 35% faster by inlining fast-paths.
347 * ``del sorted_list[:]`` now calls `clear` and is much faster.
348 * ``sorted_list[:] = values`` now calls `clear` and `update` and is much faster.
349
350 **Miscellaneous**
351
352 * Added Python 3.5 support in tox testing.
353 * Added discussion of `ruamel.ordereddict.sorteddict` to performance
354 documentation.
355 * Merged file ``sortedlistwithkey.py`` into ``sortedlist.py``.
356
357 0.9.6 (2015-06-22)
358 ------------------
359
360 **API Changes**
361
362 * Added ``islice`` method to sorted list, dict, and set types.
363 * Added ``irange`` and ``irange_key`` method to sorted list, dict, and set
364 types.
365
366 0.9.5 (2015-03-16)
367 ------------------
368
369 **API Changes**
370
371 * Added ``bisect_key`` methods to sorted list, dict, and set types.
372 * Added ``last=True`` argument to ``SortedDict.popitem``.
373
374 0.9.4 (2014-12-04)
375 ------------------
376
377 **Bugfixes**
378
379 * Added implementation and testing for Python pickle module.
380
381 0.9.3 (2014-11-30)
382 ------------------
383
384 **API Changes**
385
386 * Removed ``SortedListWithKeyPair`` type.
387
388 **Improvements**
389
390 * Changed type references to ``self.__class__`` as able.
391
392 0.9.2 (2014-10-20)
393 ------------------
394
395 **API Changes**
396
397 * Removed ``value_orderable`` argument from ``SortedListWithKey`` initializer.
398 * Added key-callable argument to ``SortedDict`` initializer.
399 * Added key-callable argument to ``SortedSet`` initializer.
400
401 **Improvements**
402
403 * Changed ``SortedDict`` to inherit directly from ``dict``.
404
405 **Miscellaneous**
406
407 * Added PyPy3 support to tox testing.
408 * Added ``SortedListWithKey`` to sorted list performance comparison
409 documentation.
410
411 0.9.1 (2014-09-20)
412 ------------------
413
414 **Bugfixes**
415
416 * Changed ``SortedList.__setitem__`` with slices to correctly update internal
417 "maxes" index.
418
419 0.9.0 (2014-09-17)
420 ------------------
421
422 **API Changes**
423
424 * Added ``__ior__``, ``__iand__``, ``__isub__``, and ``__ixor__`` methods to
425 ``SortedSet`` interface.
426
427 **Improvements**
428
429 * Changed position-based indexing to use dense tree-based index.
430
431 **Miscellaneous**
432
433 * Added workload-based performance comparison for sorted list: Priority Queue,
434 Multiset, etc.
435
436 0.8.5 (2014-08-11)
437 ------------------
438
439 **Bugfixes**
440
441 * Changed copy methods to make shallow copies: values are not copied, only
442 references to values are copied.
443
444 **Miscellaneous**
445
446 * Added load-factor performance comparison documentation.
447
448 0.8.4 (2014-07-29)
449 ------------------
450
451 **API Changes**
452
453 * Added ``value_orderable`` parameter to ``SortedListWithKey`` to support
454 incomparable value types.
455
456 **Bugfixes**
457
458 * Changed ``repr`` methods to prevent infinite recursion and allow easier
459 subclassing.
460
461 0.8.3 (2014-07-07)
462 ------------------
463
464 **Miscellaneous**
465
466 * Added more testing for sorted lists with key-callable argument.
467
468 0.8.2 (2014-06-13)
469 ------------------
470
471 **API Changes**
472
473 * Added ``SortedListWithKey`` type with implementation based on
474 ``(key, value)`` tuples.
475
476 0.8.1 (2014-05-08)
477 ------------------
478
479 **Bugfixes**
480
481 * Added contains-key check in sorted dict equality comparisons.
482
483 **Miscellaneous**
484
485 * Added Python runtime comparison to documentation.
486 * Added sorted dict and set comparison to benchmark documentation.
487 * Added Travis-CI testing.
488
489 0.8.0 (2014-04-08)
490 ------------------
491
492 **API Changes**
493
494 * Added ``bisect`` methods from ``SortedList`` to ``SortedDict`` interface.
495
496 0.7.0 (2014-04-02)
497 ------------------
498
499 **Miscellaneous**
500
501 * Added Banyan module to benchmark documentation.
502
503 0.6.0 (2014-03-18)
504 ------------------
505
506 **Miscellaneous**
507
508 * Added testing support for CPython 2.6, 2.7, 3.2, and 3.3 with full coverage.
509
510 0.5.0 (2014-03-14)
511 ------------------
512
513 * Initial release of sorted list, dict, and set types.