Description
Wiki groups no longer preserve ordering.
Steps to reproduce
n/a
Example
http://wireless.kernel.org/en/developers/navi
my theme code relies on ordering -- the order should be that way in the theme (compare the two lists)
Component selection
- general
Details
MoinMoin Version |
1.9 repo as of today |
OS and Version |
|
Python Version |
|
Server Setup |
|
Server Details |
|
Language you are using the wiki in (set in the browser/UserPreferences) |
|
Workaround
Discussion
Fix:
Index: moin/MoinMoin/datastruct/backends/__init__.py =================================================================== --- moin.orig/MoinMoin/datastruct/backends/__init__.py 2010-02-09 09:12:41.000000000 +0100 +++ moin/MoinMoin/datastruct/backends/__init__.py 2010-02-09 09:12:50.000000000 +0100 @@ -180,10 +180,10 @@ """ Retrieve group data from the backend and filter it to members and group_members. """ - members_retrieved = set(self._backend._retrieve_members(self.name)) + members_retrieved = list(self._backend._retrieve_members(self.name)) member_groups = set(member for member in members_retrieved if self._backend.is_group_name(member)) - members = members_retrieved - member_groups + members = [memb for memb in members_retrieved if not memb in member_groups] return members, member_groups
I think keeping order is important -- ReimarBauer 2010-02-08 21:54:32
TODO
- update docs
use a member set additionally for __contains__ as it is O(1) while a list is O(n).
research / implement same behaviour for BaseDict
- add tests
Plan
- Priority:
- Assigned to:
- Status: