Groups2009 code:
Whitespace fix http://hg.moinmo.in/moin/1.9-groups-dmilajevs/rev/cb95dae6cbe0?revcount=50
Docstring refinements provided by ThomasWaldmann for the BackendManager, GroupManager and related tests. http://hg.moinmo.in/moin/1.9-groups-dmilajevs/rev/1b84b35fbe91
wikidicts were refactored. request.dict provides access only to WikiDicts. DictBase class was merged with Dict. Group class was removed. DictDict was merged with GroupDict removing methods related to the group functionality. The cache key for dicts changed from 'dicts_groups' to 'dicts'. wikidicts test was refined to capture new functionality. Changes in the other code to use DictDict.contains instead of has_dict and DictDict.getitem in place of dict. http://hg.moinmo.in/moin/1.9-groups-dmilajevs/rev/7a826f946da3
Groups2009 wikipage: Discussion about Group
- Group description on the Groups2009
20:33 < ThomasWaldmann> dimazest: any questions about Group: stuff yet? 20:34 < dreimark> ernestas: we serve underlay on master 20:34 < dimazest> ThomasWaldmann: now, group is set, so it doesnt has to have members 20:34 < dimazest> but, if it is internal object it's fine 20:35 < ThomasWaldmann> you'll need 2 sets internally: direct members and references to other groups 20:35 < ThomasWaldmann> both just contain names (unicode) 20:35 < dimazest> ThomasWaldmann: then if object is not un the members set, member_groups is checked? 20:36 < ThomasWaldmann> Groups.__contains__ first checks members, the iterates over member_groups and delegates to their __contains__ 20:37 < ThomasWaldmann> (and the caching will only cache those names, no expanded stuff) 20:37 < ThomasWaldmann> (you can easily add caching later btw) 20:37 < dimazest> ok 20:37 < ThomasWaldmann> Groups.__repr__ will give a sane representation to easy debugging 20:37 < ThomasWaldmann> ease 20:39 < ThomasWaldmann> Groups.__iter__ will first yield members' members, then iterate over member_groups and yield THEIR members 20:39 < ThomasWaldmann> you kill wikidictsrescan and related stuff 20:40 < ThomasWaldmann> the Group objects will handle ALL caching related stuff internally 20:40 < dimazest> that i like, the more internal stuff the better 20:40 < ThomasWaldmann> ... and life will be much easier :) 20:41 < ThomasWaldmann> maybe you can just do that for config groups and later for wiki page based groups 20:42 < dreimark> name = 'wiki' should be replaced by the right one, we have more than one markup 20:42 < ernestas> http://master19.moinmo.in/HelpOnActions Some descriptions start with a capitalised first word of the sentence, others do not. This may be trivial but what should I use in my translation: capitalised first words or not, or have them mixed like it's now in the original page? 20:47 < ThomasWaldmann> dimazest: for the creation of a Group object, there could be some from_page() class method that delegates parsing depending on the page format (moin wiki vs. creole vs ...) 20:47 < dreimark> ernestas: the en ones should all start with a capitalised first word. All should be correct sentences 20:47 < ernestas> I even tried to see a system in that mix. I thought if a description has only one sentence, then the first word is not capitalised and vice versa but I was wrong. Maybe I'm just digging to deep:) ok dreimark 20:48 < dreimark> I thinks it is more lazy writing 20:48 < dimazest> ThomasWaldmann: from_page() is specific for wiki backend, ldap does not need this 20:49 < xorAxAx> ThomasWaldmann: i think its most prominent role is in the disabling of the delete use case in the user interface 20:49 < ThomasWaldmann> dimazest: sure, the ldap Group object would not have this