HomeSoftware Heritage

SortedList: Don't inherit from UserList.

Description

SortedList: Don't inherit from UserList.

A class should only inherit from UserList if the type of data it presents is
the same as the data in the 'data' attribute, which isn't true here.

This means, for example, that SortedList.contains checked if the value
is in self.data, which always returns False (unless unlucky, but then it
returns True while it shouldn't).

By removing this inheritance, methods that are no longer implemented no longer
default to a buggy implementation.

Details

Provenance
vlorentzAuthored on Sep 29 2020, 7:24 PM
vlorentzPushed on Sep 30 2020, 7:53 PM
Differential Revision
D4087: SortedList: Don't inherit from UserList.
Parents
rDCOREd46d4c7ac578: Add specific celery task arguments to metadata sent to systemd-journald
Branches
Unknown
Tags
Unknown
References
tag: v0.3.1
Build Status
Buildable 15742
Build 24234: test-and-buildJenkins console · Jenkins