IRC log of #zope3-dev for Monday, 2007-06-04

*** timte has quit IRC00:02
*** jfroche has quit IRC00:04
*** pelle_ has joined #zope3-dev00:17
*** d2m has quit IRC00:44
*** yota has quit IRC00:49
*** pelle_ has quit IRC00:53
*** elro has joined #zope3-dev01:11
*** Jell-O-Fishi has joined #zope3-dev02:11
*** projekt01 has quit IRC02:22
*** natea|tipisprint has quit IRC02:42
*** benji has joined #zope3-dev02:52
*** foxmjay has quit IRC03:02
*** elro has quit IRC04:03
*** alecm has joined #zope3-dev04:58
*** alecm has quit IRC05:00
*** stub has joined #zope3-dev05:19
*** alga has quit IRC06:05
*** pcardune has joined #zope3-dev08:01
*** afd_ has joined #zope3-dev08:06
*** stub has quit IRC08:31
*** stub has joined #zope3-dev08:32
*** sorin_ has joined #zope3-dev08:38
*** sorin_ is now known as sorindregan08:39
*** srichter has joined #zope3-dev08:59
*** ChanServ sets mode: +o srichter08:59
*** d2m has joined #zope3-dev09:32
*** schwendinger has joined #zope3-dev09:33
*** baijum has joined #zope3-dev09:34
*** ktwilight_ has quit IRC09:35
*** sm has joined #zope3-dev09:36
*** ktwilight_ has joined #zope3-dev09:38
*** b52Centos has joined #zope3-dev09:55
*** b52GM has quit IRC10:09
*** yvl has quit IRC10:12
*** yvl has joined #zope3-dev10:13
*** ghendi has joined #zope3-dev10:20
*** jfroche has joined #zope3-dev10:43
*** yota has joined #zope3-dev10:43
*** alga has joined #zope3-dev10:45
*** Aiste has joined #zope3-dev10:46
*** harobed has joined #zope3-dev10:53
*** ccomb has joined #zope3-dev10:55
*** Jell-O-Fishi has quit IRC10:59
*** bigkevmcd has joined #zope3-dev11:07
*** srichter has quit IRC11:21
*** tarek has joined #zope3-dev11:24
*** MJ|nearby has joined #zope3-dev11:27
*** MJ|nearby is now known as MJ11:28
*** yvl has quit IRC11:46
*** alga has quit IRC11:55
*** ktwilight has joined #zope3-dev12:02
*** dennis__ has joined #zope3-dev12:05
*** sm is now known as sm-afk12:15
*** ktwilight_ has quit IRC12:16
*** roym` has joined #zope3-dev12:36
*** regebro has joined #zope3-dev12:39
regebroHiya all! Quick Qestions: How do I best use testbrowser to test that somethindg DOESN'T work?12:40
*** pelle_ has joined #zope3-dev12:40
regebroI wanna check that a user is not allowed to do something. I tried failUnlessRaises(HTTPError), but its still prints out the Unauthorized error to stdout. Not nice.12:41
*** projekt01 has joined #zope3-dev12:48
*** pelle_ has quit IRC12:51
*** roym has quit IRC12:52
regebroOK, I'm rephrasing the question after having looked some more:12:53
*** pelle_ has joined #zope3-dev12:53
regebroIs there a good way of using testbrowsers when NOT using doctests?12:53
regebroThat is, getting is NOT to print out exceptions to stdurl?12:54
*** timte has joined #zope3-dev12:54
regebrostdout I mean.12:54
*** deo has joined #zope3-dev12:59
*** dunny has quit IRC13:08
projekt01regebro, I don't understand what you mean. What do you like to do?13:20
regebroI'd like to NOT have my test print out Unautorized errors to stdout when I run the test.13:21
regebroprojekt01: I have just figured out it's actually the Zope2 publisher doing this, not the test-browser.13:21
projekt01regebro, you can enable or diesable errors handling in test browser like:13:24
projekt01browser = Browser13:24
projekt01browser.handleErrors = False13:24
regebrooh, isn't handleErrors a method?13:26
projekt01I guess not, the sample above works in our tests13:26
regebroOK, trying.13:29
regebroprojekt01: Thanks, that may be useful, but I still get the error printed out to stdout.13:33
regebroI think I need to set up a testing config or something, which sucks.13:33
projekt01If you set handleErrors = False the errors will get handled by the system error view, with handleErrors=True  the errors will and as a TraceBack in the doctest.13:35
projekt01Do you have a error view regsitered for the error you get in the doctest?13:36
regebrodoctests are for testing documentation. :)13:36
regebroI'm not doing that.13:36
projekt01do you get a TraceBack in the test?13:38
projekt01You can catch them with three dots TraceBack ... ValueError or something like that13:38
*** seizure has joined #zope3-dev13:39
regebroBut I'm not using doctests.13:40
projekt01What kind of test are you using13:40
regebroA normal unittest.13:41
*** ignas has joined #zope3-dev13:41
projekt01does assertRaises not work?13:41
regebroYes it does. But Zope prints out a traceback to stdout. I'm trying to get rid of it,13:42
projekt01Huh, on a new trunk?13:42
regebroI think I need to set up a testing config or something, which sucks.13:42
projekt01Are you testing views in unit tests?13:44
regebroI'm not sure I understand the question. How would use use views in unit tests? What does that mean=13:45
regebroGeez, I cant read.13:46
regebroYou say TESTING, not using.13:46
regebroCurrently no.13:46
regebroOr, well, possible, yes. Depending on your view.13:46
projekt01Hm, curios, I guess you have to find out what is printing the error to stdout13:47
regebroI am using the testbrowser to test functional functionality in unit tests, yes.13:47
regebroYeah, I'm trying...13:47
projekt01If you test views, it's probably a missing view which handles the errors.13:47
*** seizure has left #zope3-dev13:49
regebroNo, I just need Zope to stop logging to stdout, I think. it's a test.conf or something?13:52
regebroTrying to google, but failing.13:52
CrippsFXstdout and stderr are *pretty much* the same. They sure look the same ... try running with "2>/dev/null" on the end of bin/runzope, and see if you still get the errors printing to "stdout"13:55
*** pcardune_ has joined #zope3-dev13:56
CrippsFXmorning paul13:56
CrippsFXmorning projekt01 :)13:56
regebroCrippsFX: That's not the issue. The issue is getting Zope to stop printing it.13:56
regebroIf it's stdout or stderr I don't really care.13:57
*** pelle_ has quit IRC13:57
CrippsFXregebro: what I proposed was a command line redirect. It will take stderr and pipe it to null. You won't see it.13:57
regebroYeah, but I want to see stdout and stderr.13:57
CrippsFXregebro: python takes care of printing all the message you see on the command line.13:57
CrippsFXregebro: you want to see stdout and stderr, but you don't want to see them on the command line?13:58
regebroI repeat: This is not the issue. The issue is getting rid of one specific thing thats gets printed.13:58
CrippsFXokay. I'll go away since I obviously don't know what's going on.13:59
regebroprojekt01: You were onto something, It does not print the error when failing. It prints the error when failing to handle the error. I'll set up the site to handle the error properly, and it should be hunky dory, I hope,14:04
*** benji has quit IRC14:08
projekt01See line 140, I guess this happens in your case.14:12
*** pcardune has quit IRC14:14
*** MJ is now known as MJ|lunch14:49
*** grahal has joined #zope3-dev14:54
*** alga has joined #zope3-dev14:57
*** Aiste has quit IRC15:05
CrippsFXman ... I'm getting some weird error ... I have a Computer object that I'm trying to use ... I took off the constraint for Computer to be held in ComputerFolder, and I'm trying to add it to the ZODB root via the ZMI, but I get the error located here:  ... it seems the containment machinery hates me. Does anyone have any insight as to what's wonky here? More information is available upon request.15:10
*** niemeyer has joined #zope3-dev15:12
*** Aiste has joined #zope3-dev15:12
dennis__Crippsfx if you are following the wc book example, it worked fine for me :) so must be some small config error15:12
CrippsFXdennis__: yeah, I am following the WC example.15:12
CrippsFXmore or less ...15:12
dennis__can be many things gone wrong, can you show the interfaces for computer and computerfolder ?15:13
CrippsFXdennis__: yeah, just a few moments, I'll pastebin them.15:14
*** benji has joined #zope3-dev15:15
CrippsFXmorning benji15:15
CrippsFXdennis__: the only way I can see something going wrong is if something is trying to access Computer.__parent__ directly ... but the containment machinery should automatically say "hey, this is a non-locatable object ... let's wrap it in a containment proxy"15:16
dennis__you are omitten __parent__ and __name__ from your forms ?15:16
CrippsFXdennis__: no need for them.15:16
dennis__why is line 52 commented out ?15:17
CrippsFXdennis__: I wanted to remove the containmetn constraint for testing purposes.15:17
dennis__in your Computer object, after implements( IComputer ), do you set __name__ = __parent__ = None ?15:18
CrippsFXdennis__: no ...15:18
CrippsFXI'll try that.15:18
dennis__page 29015:19
dennis__line 815:19
dennis__in example 15.3.415:19
CrippsFXah, well I'll be damned. Thanks fir your eyes dennis__ :)15:20
CrippsFXtoo many typos this morning ... it's 10:00 and I'm almost done my second cup o' coffee :P15:20
CrippsFXdennis__: beauty.15:22
benjiCrippsFX: must be in Greenland (or his clock is wrong <wink>)15:25
CrippsFXbenji: why what time does it say I am?15:25
benjiyou said 10:00 about 5 minutes ago15:26
CrippsFXbenji: nope ... I'm not in Greenland ... it's 10:30 there ... :P15:26
CrippsFXI'm in Newfoundland15:26
benjiclose enough <wink>15:27
CrippsFXfor a nuke, yes :D15:27
benjinot quite15:27
* benji lives near Washington D.C., so he's thought about things like nuke radii15:28
CrippsFXhahaha ... wait ... that's not funny.15:28
CrippsFXI don't think a Nuclear winter could make it any colder here anyways.15:28
CrippsFX... might make it drier ... that would be nice.15:28
*** thruflo has joined #zope3-dev15:30
* thruflo waves to *15:31
* CrippsFX waves to thruflo 15:31
thruflohey CrippsFX :)15:32
*** MJ|lunch is now known as MJ15:35
* CrippsFX is back15:42
*** elro has joined #zope3-dev15:52
*** Newfie2007 has joined #zope3-dev15:59
*** marianom has joined #zope3-dev16:02
*** regebro has left #zope3-dev16:08
*** baijum has quit IRC16:17
*** whit has joined #zope3-dev16:21
*** stub has quit IRC16:23
*** schwendinger has quit IRC16:23
*** schwendinger has joined #zope3-dev16:23
*** meatballhat has joined #zope3-dev16:29
CrippsFXwhen I register an "addMenuItem" using a class to create a Computer Object (via the zmi) the menu item shows up at the zmi root, but when I use a factory it shows up where it's supposed to (in the ComputerFolder container). When I add at the top level it fails because of containment constraints ... but here's the weird part ... using the class, I get the add form, which I want, but using the factory I don't get the add form, which is bad.16:32
CrippsFXahh .. I know what I need to do, I need to make an adapter, or a utility that grabs the form template ...16:35
*** tonico has joined #zope3-dev16:39
*** nerdalert has joined #zope3-dev16:43
*** natea|tipisprint has joined #zope3-dev16:48
*** sorindregan has quit IRC16:56
CrippsFXhehehe ... PFM ...17:04
*** whit has quit IRC17:04
*** pelle_ has joined #zope3-dev17:05
CrippsFXI tried registering my browser.ComputerAdd class as a factory, but that didn't work, and when I pulled it out, the factory (that I had tried before) gave me an addform precisely where I wanted.17:05
*** pcardune_ has quit IRC17:07
*** sorin has joined #zope3-dev17:10
*** sorin is now known as sorindregan17:11
*** pelle_ has quit IRC17:11
*** stub has joined #zope3-dev17:11
*** sorindregan has quit IRC17:19
*** afd__ has joined #zope3-dev17:21
*** pelle_ has joined #zope3-dev17:23
*** afd_ has quit IRC17:36
*** ghendi has quit IRC17:38
*** reco has joined #zope3-dev17:41
CrippsFXpelle_: you at a sprint?17:45
pelle_CrippsFX: yes at the piktipi17:46
CrippsFXpelle_: good on ya :)17:46
pelle_and you :)17:46
CrippsFXpelle_: I'm not sprinting, but I help when I can :)17:46
*** mgedmin has joined #zope3-dev17:47
CrippsFXmorning mgedmin17:47
*** whit has joined #zope3-dev17:49
*** afd__ has quit IRC17:50
*** pelle_ has quit IRC18:10
*** pelle_ has joined #zope3-dev18:13
*** sm-afk is now known as sm18:23
*** elro has quit IRC18:52
*** elro_ has joined #zope3-dev18:52
*** elro_ is now known as elro18:52
*** projekt01 has quit IRC18:57
*** pelle_ has quit IRC19:03
*** natea|tipisprint has quit IRC19:08
*** natea|tipisprint has joined #zope3-dev19:10
*** pelle_ has joined #zope3-dev19:11
*** tonico has quit IRC19:13
*** BjornT_ has quit IRC19:30
*** MJ has quit IRC19:33
*** schwendinger has quit IRC19:38
*** Jell-O-Fishi has joined #zope3-dev19:50
* CrippsFX beats his head against NameChooser20:02
mgedminNameChoosers are great20:02
mgedminwell, passable20:02
mgedminokay, I can just about live with them :)20:03
CrippsFXhahaha ... I got it ...20:04
CrippsFXmy implementation is kind of messy though ...20:04
CrippsFXmgedmin: basically, using uuid for names ... I really see no need for checkName in this case because name will never be user specified ... and I don't want 3 args for chooseName because I want to set Computer.uuid through the name chooser.20:05
CrippsFXbut, I have something that works, so I should stop complaining :P20:05
CrippsFXcorrection ... I do *not* have something that works.20:06
* CrippsFX sighs20:06
rockyhm... do any of you ever try to attach docstrings to your schema attribute definitions? and if so... how do you normally do that?20:10
benjiduct tape20:12
rockyseriously tho, is it possible?20:12
rockyi mean sometimes the "description" attribute of my field is good enough, in this case it is not20:13
benjischema fields (or all the ones I know of at least) have a description parameter to their constructor20:13
benjiI suppose you could assign __doc__ if you really felt like it20:13
*** harobed has quit IRC20:13
rockybenji: the problem is that in this case, i'd like the description to be something user friendly ...something a user editing a form would like to see... where as i'd like the docstring to indicate some specific detail about what the field is itnended for20:14
benjiI'd normally put that in a comment, but if you have some tool extracting docstrings, then assigning to __doc__ is your best bet20:15
benjiif you do it much you could have a wrapper function so you could do foo = doc(zope.schema.Foo(...), "big long docstring")20:15
rockymostly i'd like to use a docstring in case someone is inspecting code and doing help()20:16
rockybut a comment is probably the path of least resistance ;)20:16
benjiattr = zope.schema.Foo(...)20:16
benjiattr.__doc__ = "..."20:17
benjilooks pretty good to me20:17
benji(if there's not some reason that won't work)20:17
rockyregarding your previous comment, about making a doc() method ... do python descriptors work on any arbitrary class attribute or just function/method declarations?20:17
benjiI'm not an expert in that area, but I don't think there's anything special about method handling there.20:18
CSWookieI tried to do it once and ran into strangeness, as I recall.  I don't remember what it was.  Maybe it involved help(class).20:20
rockywell, if it did wouldn't class descriptors work?20:20
rocky(which don't, as we know)20:20
*** alecm has joined #zope3-dev20:20
*** yvl has joined #zope3-dev20:21
*** RaFromBRC has joined #zope3-dev20:23
*** meatballhat has left #zope3-dev20:24
*** nerdalert_ has joined #zope3-dev20:27
*** goplus has joined #zope3-dev20:29
*** goplus has left #zope3-dev20:32
*** Jell-O-Fishi has quit IRC20:38
*** stub has quit IRC20:40
*** jrc2e has joined #zope3-dev20:42
*** nerdalert has quit IRC20:43
*** Aiste has quit IRC20:44
*** RaFromBRC has quit IRC20:45
*** RaFromBRC has joined #zope3-dev20:47
*** alga has quit IRC20:55
*** pelle_ has quit IRC21:13
*** natea|tipisprint is now known as natea|dinner21:16
*** schwendinger has joined #zope3-dev21:22
*** ignas has quit IRC21:24
*** schwendinger_ has joined #zope3-dev21:44
smg'day all. What can cause CRITICAL txn.65540 A storage error occurred during the second phase of the two-phase commit. , other than not enough disk space ?21:50
smI observe this with zope2/zeo but found no help on #zope21:51
smany pointers welcome21:51
mgedminisn't there a traceback in one of the log files?21:52
CrippsFXwell ... I'm headed out for the night. I'll be back in the morning. Ciao.21:53
smmgedmin: I guess there is.. I assumed it was from a second, follow-up error21:55
lisppaste6sm pasted "storage error" at
mgedmintpc_finish is the second phase of the two-phase commit, I think21:56
mgedminso it could be the error21:56
smok, that helps21:57
mgedminunless there's another traceback above, with ore or less the same timestamp?21:57
smno, that's all21:57
mgedminwhat's Module ZEO.cache, line 375, in invalidate?21:57
mgedminwhat does the assert look like?21:57
benjiassert o is not None21:57
benji(on the trunk, that is)21:58
smyes.. after        o = self.fc.access((oid, cur_tid))21:58
benjithe comment above "access" says "Return Object for key, or None if not in cache."21:59
*** schwendinger has quit IRC22:00
*** Newfie2007 has left #zope3-dev22:00
* benji reenters lurk mode as his ZODB knowlege is now exhausted22:00
* mgedmin has considerably less ZODB knowledge compared to benji22:01
smyou moved me forward.. thanks :)22:01
mgedminsm: you could ask on the ZODB mailing list22:01
mgedminpeople with ZODB knowledge tend to lurk there22:02
smthx, I think I might need to22:02
*** schwendinger_ is now known as schwendinger22:02
mgedminI'd suspect either a bug in ZODB/ZEO, or some hardware fault (flipping a random bit in memory that just happens to be an oid, or something)22:02
benjism: if you're _really_ lucky and have a small database you're willing to make public (or semi-public) and can reproduce this problem with it, someone might dissect it for you22:03
*** schwendinger_ has joined #zope3-dev22:03
*** pelle_ has joined #zope3-dev22:06
*** pelle_ has quit IRC22:13
*** thruflo has left #zope3-dev22:14
*** pelle_ has joined #zope3-dev22:19
*** schwendinger has quit IRC22:20
*** schwendinger has joined #zope3-dev22:21
*** schwendinger_ has quit IRC22:24
*** afd__ has joined #zope3-dev22:24
*** scherand has joined #zope3-dev22:41
*** scherand has left #zope3-dev22:41
*** nerdalert_ is now known as nerdalert22:46
*** sm is now known as sm-afk22:52
*** cr3 has joined #zope3-dev22:53
rockyhm, did vocabulary factories exist < zope 3.3 ?22:55
*** schwendinger_ has joined #zope3-dev22:57
cr3utilities/ doesn't seem to be extracting the html tags marked as i18n:translate="" in my .pt files. might I be missing something?22:57
rockynvm it does22:58
cr3nvm for me too :) I need to specify the i18n:domain in each .pt file22:59
mgedminabout vocabulary factories existing in older zopes23:01
rockyok how bout this one, what's the standard way to provide a vocabulary to zope.schema.Set ?23:03
rockyfor a widget, obviously23:03
mgedminmy_field = Set(value_type=Choice(vocabulary=...))23:04
mgedminI don't remember how usable are the default Set widgets23:04
mgedmindon't be surprised if they store lists rather than sets in your data objects23:05
rockyhehe ok23:06
*** pelle_ has quit IRC23:08
mgedminif I have a long-running request, is there any way to dribble data to the client side?23:12
*** dunny has joined #zope3-dev23:12
*** schwendinger has quit IRC23:14
*** pelle_ has joined #zope3-dev23:16
*** RaFromBRC is now known as RaFromBRC|lunch23:19
mgedminobviously 11pm is not the best time for questions like this...23:19
dennis__mgedmin can you have the data in a file like object? tempfile or stringio or such?23:21
cr3how do I change the language used by zope to render pages to the language of the user?23:22
dennis__oops no not strinio, must be a file23:22
mgedminI'm calculating some statistics for several thousand objects from the ZODB23:22
mgedminI know how many objects there are, so I would like to show some AJAX-y progress bar23:22
dennis__hmm easy way is polling, i don't know how to make zope flush its output buffers and return content of unknown length23:23
dennis__sorry :(23:23
mgedminWSGI has something for this, I think23:23
mgedmininstead of returning a string you write a generator that yields the bits when they're ready23:24
mgedminor I could have the client poll for the progress, but for that I'd need some way to track what's happening in a request currently being processed in another thread from another transaction23:24
*** pelle_ has quit IRC23:24
dennis__would make an interesting howto when you figure it out23:25
mgedminhey, I've got a blog23:25
mgedminI could write about this if I ever figure it out23:25
dennis__ah yeah i remember :)23:26
dennis__please do23:26
* mgedmin loves ezmerge.py23:27
*** pelle_ has joined #zope3-dev23:29
*** pelle_ has quit IRC23:30
*** pelle_ has joined #zope3-dev23:31
dennis__hmm if i have a site with a menu bar at the top for main navigation, and add an entry for for example "News", which should just go to /News/index.html,  what do I put in the zcml? a template or a class? the context should be the "News" object of the site. Basically I would like to just have a URL there? anyone have any nice examples?23:46
dennis__(using browser:menu   and browser:page)23:46
mgedminprobably a <browser:menuItem>23:54
dennis__do you know an example somewhere which uses its own menus? (ie not zmi?)23:55
ccombyou probably don't need anything if your menu is generated from the list of folders23:55
*** mgedmin has quit IRC23:56
dennis__you mean like a viewlet with some view code which returns the list of folders and a template which puts it in a list?23:57
ccombyou can also select which folders to include in the menu by putting a marker interface on them23:57
ccomb(or any attribute)23:58
dennis__currently i was trying to have the respective folders (news, articles, etc) to add themselves to a global nav menu. Your suggestion would work fine too (actually better :). Just wondering what the correct way to use the menus is23:58
*** afd__ has quit IRC23:59
ccombi think zcml menuItem is better for things like action menus or add menus23:59

Generated by 2.15.1 by Marius Gedminas - find it at!