IRC log of #schooltool for Tuesday, 2005-04-12

FarcePestit takes about 1 minute to do the import (CPU-bound)00:43
FarcePestit turns out I only end up with 81 groups/sections, but still about 6370 students00:50
FarcePestactually, it turns out some of my source data is basically fubared, which really shouldn't surprise me01:08
bskahananyone know how to decide when to remove securit yproxy?01:15
*** bskahan has quit IRC01:33
*** Aiste has quit IRC09:10
*** Aiste has joined #schooltool09:19
*** alga has joined #SchoolTool11:09
*** mgedmin has joined #schooltool13:52
*** bskahan has joined #schooltool14:13
*** SteveA_ has joined #schooltool14:36
*** SteveA has quit IRC14:37
*** ignas has joined #schooltool14:50
*** jinty has joined #schooltool15:01
*** thisfred has joined #schooltool15:54
*** SteveA_ has quit IRC16:32
*** SteveA_ has joined #schooltool16:52
*** SteveA_ has quit IRC17:08
*** SteveA_ has joined #schooltool17:10
*** SteveA_ has quit IRC17:20
*** jinty has quit IRC18:54
*** jinty has joined #schooltool19:03
*** ignas_ has joined #schooltool19:16
*** ignas has quit IRC19:16
mgedmin/home/mg/src/schoolbell/src/schoolbell/app/rest/tests/test_app.py: WARNING: TestResourceContainerView not in test suite19:19
bskahani don't get that warning with ./test.py -pv19:22
bskahanon an up to date tree19:22
*** jinty has quit IRC19:26
*** tvon has joined #schooltool19:28
mgedminbskahan, warnings are disabled unless you pass -w to test.py19:36
bskahanmgedmin: thanks19:36
mgedminfor historical reasons19:36
mgedmin(back when bits of zope 3 were included directly in src/, they produced spurious warning because abstract test base classes were named TestFoo etc.)19:36
FarcePesthow can you remove groups using ZODB? I thought that del groups[g] where groups is the GroupContainer and g is the Group id would do it, but nothing happens (no error, but group not deleted, and yes I am doing transaction.commit())19:42
mgedminFarcePest, it should work19:46
mgedminyou should also post an ObjectDeletedEvent19:47
mgedminotherwise existing relationships will prevent the group object from being garbage collected19:47
mgedminbut the group itself shouldn't be accessible from the groups container after you do del groups[...]19:47
FarcePestthat makes a certain amount of sense, though I am deleting groups with no members (or events, etc.)19:48
FarcePesthow to I post an event?19:48
mgedminwhat I said wasn't entirely correct19:49
mgedmin1. the event is called ObjectRemovedEvent19:49
mgedmin2. it is posted automatically when you do del container[id]19:49
mgedminso just del should suffice19:49
FarcePestmaybe they really are deleted, which means I have a different problem: What's the best way to determine if a group has members? len(group.members)?19:54
FarcePestbasically I have a loop over the groups and am trying to delete all the empty groups19:55
FarcePestat least some (or most) of the empty groups get deleted, but some that are empty don't seem to be detected as such19:55
*** thisfred has quit IRC19:57
FarcePestdeleting groups is slow, only a couple/sec20:15
FarcePestlen(group.members) is slow, might be cause of above slowness20:16
mgedminbool(group.members) should do the right thing20:21
FarcePestbool() is a lot faster than len()20:25
ignas_do we need backcompatibility of our restive interface between SB and ST ?20:30
ignas_i am going to break it!20:35
ignas_if no one stops me ...20:35
bskahanno stop!20:35
bskahanok, nevermind20:36
th1aWe ought to have a functioning client interface or library that uses the REST interface, so keeping the command line interface in sync would be nice.20:37
mgedminthe diff between trunk/schooltool and branches/schooltool-0.9.x is > 8000 lines long20:38
mgedminhalf of it is in the .po file20:38
mgedmina quarter is in jinty's stuff (debian/, setup scripts, release notes etc.)20:38
mgedminsome of it is in actual source code (I've noticed cosmetic fixes, typo fixes, and something to do with DATADIR)20:39
mgedminI'm confused20:39
mgedminI hoped that we could svn rm trunk/schooltool and just keep the 0.9.x branch20:39
mgedminthen start copying things over bit by bit20:39
bskahanwhy there's any new code in trunk?20:39
mgedminbut perhaps we need to first merge fixes (if there are any) from trunk to the branch?20:40
bskahando you know what revision the 0.9 branch is from?20:42
mgedminno, but I can find out20:43
mgedminit also has quite a number of backports of later fixes from trunk, I think20:43
bskahanlooking at ViewCVS interface it looks like the changes under source in the last 2 months relate to translations20:44
*** tvon has quit IRC20:51
*** tvon has joined #schooltool20:52
*** alga has quit IRC21:32
FarcePestfor a container (like GroupsContainer), should .keys() return a list of all the ids of all the contained objects?21:41
mgedminyes21:43
FarcePesti have a test case where it does not21:43
FarcePest    if "65465" in groups:21:45
FarcePest        print "65465 sighted"21:45
FarcePest    for g in groups.keys():21:45
FarcePest        if g == "65465":21:45
FarcePest            print "I see 65465 in the loop"21:45
FarcePestonly prints: 65465 sighted21:45
mgedmininteresting21:46
FarcePestyeah, that's kinda what I thought too21:46
FarcePestor perhaps a more colorful term21:46
mgedminit's a standard BTreeContainer21:46
mgedmin(well, a subclass, but one that doesn't override any methods)21:46
mgedmincould your data.fs be broken?21:47
FarcePesti rebuild it each time i run my import script21:47
FarcePesti.e. rm Data.*21:47
* mgedmin has no idea21:48
bskahanmgedmin: how do you decide to call removeSecurityProxy?21:49
FarcePesti seem to remember seeing some btree updates today, i'm going to svn update and make sure everything is recompiled and try again21:49
FarcePestno joy21:51
bskahanin schoolbell.app.browser.cal.CalendarViewBase and b.a.b.overlay.CalendarSelectionView both need to get the principal from the request21:51
bskahanoverlay calls removeSecurityProxy and cal doesn't, both work21:52
*** tvon has quit IRC21:53
FarcePestdid anyone else catch the bit in #zope3-dev about zope.server going away and being replaced with twisted.web2 and twisted.component?21:54
bskahandidn't catch it this time21:55
bskahanbut I've heard mutterings about it21:55
bskahanits probably a positive thing if t happens21:55
FarcePestsrichter said "this weekend"21:55
mgedminbskahan, it depends on the situation21:56
* bskahan sees it now21:56
mgedminin general, removeSecurityProxy is to be avoided21:56
mgedminin some cases, however, it is unavoidable21:56
FarcePestinteresting development considering schooltool was/is a zope/twisted hybrid app21:56
mgedminfor example, the object you need to modify is a generic one (e.g. BoundRelationshipProperty) and you just cannot assign a single permission to it in zcml21:57
*** tvon has joined #schooltool21:57
bskahanFarcePest: its good, let every project focus on a particular component rather than having 3 implementations21:57
FarcePesttwo years ago, twisted was kind of like the anti-zope21:58
bskahanmgedmin: thanks21:59
mgedminsee ya22:05
*** mgedmin has quit IRC22:05
FarcePest(sorry, twisted.protocol and not twisted.component)22:08
FarcePestunicode22:14
* FarcePest descends into madness22:14
FarcePestfinally22:16
FarcePestok, here is the answer. This does not see all the object ids:22:18
FarcePestfor g in groups.keys():22:18
FarcePest    del groups[g] # conditionally22:18
FarcePestand this does:22:18
FarcePestfor g in list(groups.keys()):22:19
FarcePest    del groups[g] # conditionally22:19
FarcePestit turns out that groups.keys() returns a OOBTreeItems object22:20
FarcePestand deleting things from groups affects this object22:21
FarcePestthis seems at odds with normal dict behavior22:22
bskahanwould be good to file a bug with zope322:23
FarcePesti think i want to run this past folks in #zope3-dev to make sure i'm not misunderstanding something, but then, you are one of those folks...22:24
bskahanI'd take it into z3-dev since GroupsContainer isn't overriding anything in BTreeContainer22:25
tvonAnyone want to add a dev meeting note to the topic?22:39
tvon"Developer meetings held every Monday at 1500 UTC"22:39
*** Aiste has quit IRC22:47
tvonignas_: around?22:50
tvonnm22:50
*** ignas_ has quit IRC22:57
bskahanhah23:03
FarcePestth1a, +1 on your terminology proposal23:19
th1aDon't want to get too stuck on our idiosyncratic usage.23:21
bskahanwhat did I miss?23:23
bskahanah, I see it now23:23
tvon+1 here too23:24
th1aActually, this reminds me that I need to work on a glossary this week...23:24
bskahan+1 as well23:26
bskahanth1a has karma to burn23:26
th1aI haven't done any meta-moderating in a while, though.23:26
*** tvon has quit IRC23:44
*** tvon|x31 has joined #schooltool23:44
*** tvon|x31 has quit IRC23:48
*** alga has joined #SchoolTool23:53
*** bskahan has quit IRC23:58

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!