Page MenuHomeSolus

Update python-sortedcontainers to 2.2.2
ClosedPublic

Authored by algent on Sep 6 2020, 7:27 PM.
Tags
None
Referenced Files
F11015952: D9592.diff
Sat, Aug 5, 3:27 PM
F10849994: D9592.id23109.diff
Jun 12 2023, 12:14 AM
F10849789: D9592.id23151.diff
Jun 11 2023, 10:46 PM
F10827225: D9592.diff
Jun 4 2023, 4:51 AM
F10801415: D9592.diff
May 29 2023, 1:56 AM
F10779992: D9592.diff
May 24 2023, 9:40 PM
Subscribers

Details

Summary

Changelog:

  • Add "small slice" optimization to SortedList.__getitem__.
  • Silence warning when testing SortedList.iloc.
  • Fix a warning regarding classifiers in setup.py.
  • Change SortedDict to avoid cycles for CPython reference counting.

Signed-off-by: Algent Albrahimi <algent@protonmail.com>

Test Plan
  • Update python-interlvaltree.
  • Run a few scripts using spyder3.
  • Download photos from my phone using rapid-photo-downloader.
  • Run these examples using cli:
>>> from sortedcontainers import SortedList
>>> sl = SortedList(['e', 'a', 'c', 'd', 'b'])
>>> sl
SortedList(['a', 'b', 'c', 'd', 'e'])
>>> sl *= 10_000_000
sl.count('c')
>>> sl.count('c')
10000000
>>> sl[-3:]
['e', 'e', 'e']
>>> from sortedcontainers import SortedDict
>>> sd = SortedDict({'c': 3, 'a': 1, 'b': 2})
>>> sd
SortedDict({'a': 1, 'b': 2, 'c': 3})
>>> sd.popitem(index=-1)
('c', 3)
>>> from sortedcontainers import SortedSet
>>> ss = SortedSet('abracadabra')
>>> ss
SortedSet(['a', 'b', 'c', 'd', 'r'])
>>> ss.bisect_left('c')
2

Diff Detail

Repository
R3673 python-sortedcontainers
Lint
Lint Not Applicable
Unit
Tests Not Applicable