[Design Decision]: data type of buglist: set or list ?

Bug #194312 reported by Markus Korn
2
Affects Status Importance Assigned to Milestone
python-launchpad-bugs
Won't Fix
Undecided
Unassigned

Bug Description

While working on Bug 185357 I once again realized that we need to make a decision on the data type of buglists.
At the very beginning of the bughelper project this buglists where list-like objects (this explains the name). In the development process we changed the type to set for one good reasons:
   there can only be one object with the same hash in a set
This way we introduced the task-/bug- wise concept (per default py-lp-bugs's buglists can only contains one bug with bugnumber xxxx where buglists in launchpad can contain more than one bug with the same number)

The big problem now is that elements in a set are not sorted, so whenever we what to sort a buglist we need to call python's sort() function. This can be a performance killer for huge lists.
Launchpad itself has some powerful and fast options to sort buglists, if our buglists would really be lists we could benefit from this options.

from the developer point of view it is easier and a lot more pythonic to change the type from set to list and think about the task-/bug- wise concept again than implement a "sorted set".

This is definitely a decision we have to make for our hardy+1 version of py-lp-bugs, I'll give this bugreport a high importance as this would change the API and the way buglists can be used.

Any opinions or suggestions on this?

Markus

Markus Korn (thekorn)
Changed in python-launchpad-bugs:
importance: Undecided → High
Markus Korn (thekorn)
Changed in python-launchpad-bugs:
milestone: none → intrepid
Revision history for this message
Markus Korn (thekorn) wrote :

Removed milestone and changed importance to 'Undecided'. With merging the intrepid.merge branch there would be no need for changing the data-type as now the set is feeded directly by generator functions.

Markus

Changed in python-launchpad-bugs:
importance: High → Undecided
milestone: intrepid → none
Revision history for this message
Markus Korn (thekorn) wrote :

Because of some changes recently merged into main, there is no need anymore to change the type of a buglist.

Markus

Changed in python-launchpad-bugs:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.