MergeableList.remove() and pop() do not remove keys from _order
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
desktopcouch |
Invalid
|
Medium
|
Unassigned |
Bug Description
These:
def remove(self, value):
if len(self) == 1:
raise ValueError(
index = 0
for current_value in self:
# important! use the data in self first 'cause mergeable lists
# can be compared with list and tuples but no the other way around
if cmp(current_value, value) == 0:
del self[index]
index += 1
raise ValueError(
def pop(self, index):
if len(self) == 1:
raise ValueError(
value = self[index]
del self[index]
return value
do not update self._order, which means uuids are left hanging there. This results in errors in self._get_
Changed in desktopcouch: | |
status: | New → Triaged |
importance: | Undecided → Medium |
This is in fact entirely in correct: del self[index] goes through the API, and properly removes the key from the ._order list. The error we hit on the server must have a different cause...