IRC log of #zope3-dev for Thursday, 2006-07-13

*** srichter has quit IRC00:35
*** batlogg_ has quit IRC00:38
*** tarek has joined #zope3-dev00:38
*** gumpa-afk has left #zope3-dev00:46
*** zbir has quit IRC00:47
*** flox has quit IRC00:55
*** rocky has joined #zope3-dev01:17
* mgedmin discovers that test.py allows multiple -s parameters and is happy01:22
*** tarek has quit IRC01:32
*** tarek has joined #zope3-dev01:33
*** pcardune has joined #zope3-dev01:36
*** mgedmin has quit IRC01:42
*** _sussi has left #zope3-dev01:49
*** yota has quit IRC01:53
*** nathany has joined #zope3-dev01:56
*** MJ has quit IRC01:56
grahamI have an object with an attribute which is a list of subobjects02:05
grahamI can render those subobjects in a page template02:05
grahamBut now I need to write a python view which modifies them before they go to the page template02:06
grahamI'm getting a ForbiddenAttribute when I try to access them02:06
grahamDo I need to do something different, or have I just made a mistake?02:07
*** roym has quit IRC02:10
grahamI think I've just made a mistake....02:12
*** tarek has quit IRC02:16
*** jhauser has quit IRC02:16
*** tarek has joined #zope3-dev02:19
*** J1m has left #zope3-dev02:30
*** rocky has quit IRC02:37
*** zbir has joined #zope3-dev02:45
*** pcardune has quit IRC02:47
*** nathany has quit IRC04:02
*** J1m has joined #zope3-dev04:04
*** J1m has quit IRC04:05
*** pcardune has joined #zope3-dev04:11
*** benji has quit IRC04:13
*** zbir has quit IRC04:18
*** oferw has joined #zope3-dev04:40
*** TrevorP has quit IRC05:18
*** oferw has quit IRC05:22
*** TrevorP has joined #zope3-dev05:23
*** TrevorP has quit IRC05:37
*** TrevorP has joined #zope3-dev05:38
*** pcardune_ has joined #zope3-dev06:34
*** alecm has quit IRC06:38
*** stub has joined #zope3-dev06:41
*** elbixio has joined #zope3-dev06:42
*** baijum has joined #zope3-dev06:42
*** TrevorP has quit IRC06:49
*** pcardune has quit IRC06:49
*** TrevorP has joined #zope3-dev06:58
*** d2m has quit IRC07:13
*** d2m has joined #zope3-dev07:30
*** tarek has quit IRC08:02
*** dobee has joined #zope3-dev08:02
*** eins has joined #zope3-dev08:03
*** Theuni has joined #zope3-dev08:11
*** dunny has quit IRC08:33
*** ChrisW has joined #zope3-dev08:38
*** dunny has joined #zope3-dev08:51
*** srichter has joined #zope3-dev08:54
*** ChrisW has quit IRC08:57
*** MJ has joined #zope3-dev09:01
*** elbixio has quit IRC09:01
*** romanofski has joined #zope3-dev09:04
romanofskimoin :)09:06
*** hdima has joined #zope3-dev09:07
*** flox_ has joined #zope3-dev09:08
*** flox_ is now known as flox09:09
*** dunny has quit IRC09:10
*** batlogg has joined #zope3-dev09:15
*** flox has quit IRC09:28
*** TrevorP has quit IRC09:31
*** jhauser has joined #zope3-dev09:31
*** TrevorP has joined #zope3-dev09:37
*** yota has joined #zope3-dev10:01
*** oferw has joined #zope3-dev10:19
*** romanofski has quit IRC10:21
*** oferw has quit IRC10:22
*** pcardune_ has quit IRC10:27
*** oferw has joined #zope3-dev10:28
*** MJ has quit IRC10:31
*** TrevorP has quit IRC10:35
*** TrevorP has joined #zope3-dev10:36
*** flox_ has joined #zope3-dev10:41
*** flox_ is now known as flox10:41
*** dobee has quit IRC10:46
*** dobee has joined #zope3-dev10:49
*** dobee has joined #zope3-dev10:51
*** dunny has joined #zope3-dev10:54
*** MJ has joined #zope3-dev11:10
grahamHow do I render an attribute in a pt replacing all the newlines with <br> tags?11:25
grahamI'm pretty sure I need to do the processing in the view class11:25
philiKONin an attribute?!?11:25
philiKONyah, 'tis best done in python11:26
grahamIs there a function for it?11:26
philiKONtext.replace('\n', '<br>') :)11:26
grahamOkay, is there then a function to escape everything else?11:27
philiKONhmm. cgi.escape?11:27
grahamOkay.  I wasn't sure whether that did enough.  Thanks11:28
SteveAin Launchpad, we wrote a something/fmt:nl_to_br for this11:42
*** volvox has joined #zope3-dev12:01
grahamAh, that's quite nice.  Thinking back, I remember you talking about extending TALES at EP2005!12:02
*** harobed has joined #zope3-dev12:34
*** mkerrin has joined #zope3-dev12:44
*** dunny has quit IRC13:00
*** jinty has joined #zope3-dev13:04
*** ignas has joined #zope3-dev13:06
*** mexiKON has joined #zope3-dev13:16
*** philiKON has quit IRC13:26
*** eins has quit IRC14:12
*** eins has joined #zope3-dev14:19
*** baijum has quit IRC14:26
*** alga has joined #zope3-dev14:28
*** nathany has joined #zope3-dev14:29
*** jinty has quit IRC14:39
*** jhauser_ has joined #zope3-dev14:40
*** jhauser has quit IRC14:43
*** rock1 has joined #zope3-dev14:43
*** rock1 is now known as rocky14:44
*** mgedmin has joined #zope3-dev14:52
*** zbir has joined #zope3-dev14:57
*** rock1 has joined #zope3-dev14:57
*** rocky has quit IRC14:59
*** rock1 is now known as rocky14:59
*** alga has quit IRC15:09
*** zbir has quit IRC15:17
*** TrevorP has quit IRC15:24
*** TrevorP has joined #zope3-dev15:24
*** zbir has joined #zope3-dev15:32
*** oferw has quit IRC15:36
harobedhi, where is http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/FrontPage/Zope3Book source code in SVN ?15:48
harobedisn't exists ?15:48
*** zbir has quit IRC16:02
*** pcardune_ has joined #zope3-dev16:03
*** eins has quit IRC16:08
*** zbir has joined #zope3-dev16:15
volvoxharobed: I think the examples are in svn://svn.zope.org/repos/main/book/trunk16:16
*** flox has quit IRC16:17
*** flox has joined #zope3-dev16:18
*** pcardune_ is now known as pcardune16:22
*** edar has joined #zope3-dev16:23
edarHi!16:23
edarDoes anyone here know who wrote the untrusted python library?16:24
edaror is anyone here very familiar with it?16:24
*** baldtrol has joined #zope3-dev16:26
baldtrolwhen an @action is executed in a form.Form, does the view get re __init__'d once the post action is handled?16:31
SteveAyes16:35
SteveAit is a new web request16:35
SteveAentirely independent16:35
baldtrolok, i thought so16:35
baldtrolit seemed like it should, but i'm troubleshooting a bit of behavior i don't understand, and wanted to rule that out16:35
baldtrolthanks :)16:36
*** J1m has joined #zope3-dev16:44
*** RaFromBRC has joined #zope3-dev16:50
edarHi Jim :)16:57
edarJ1m: are you there?16:58
*** hdima has quit IRC16:59
edarI need to know who wrote the untrusted python interpreter for zope316:59
J1mYes, I did.17:02
*** jinty has joined #zope3-dev17:08
edarCool!17:08
edarI have some questions :)17:08
edarI'm trying to write a doctest quiz product, where I create a doctestquiz object and people can submit their solutions17:09
edarThe doctestquiz then, should test the solutions, however, I don't trust the solutions so I'm trying to use doctests and untrustedpython together17:10
SteveAedar: there's no good solution for someone putting an infinite loop in the doctest17:11
J1mright17:12
pcarduneyou could put time constraints on how long the code should take to run17:12
pcardunealthough i suppose that still isn't a *good* solution17:12
J1mYou never want to accept code from people you don't trust, at least to some degree.17:12
edarWell, let's say those people are students, and I do trust them to some extent17:13
SteveAif you run the code in a separate server instance... I mean like using xen or vmware17:13
J1mand assume you are willing to have your server seize up from time to time...17:13
SteveAthen you cna constrain the amount of time it can run for, and be somewhat assured it won't do bad things to the rest of your environment17:13
SteveAon some OSes you could use process limits / quotas / ulimit etc. to restrict the resources... but you open yourself to local exploits there a lot.  I wouldn't do it.17:14
edarhmmm however the tests are browser based, as in you click something to make the test happen17:14
edarif someone makes and infinite loop and clicks test ... the page will never refresh, or it shouldn't17:14
edarso the user will close the browser eventually, which will terminate the process17:14
SteveAI'd look more at having a way to run the code on the client side17:15
SteveAnot on the server side17:15
J1mclosing the browser will notterminate the process.17:15
edarI thought it would ... uh oh17:15
J1mThey could also enter expressions that use vast amounts of memory. puttng your server into swap death.17:15
J1mThat17:16
J1mThat's a good idea -- running in the client17:16
SteveAyou can use ulimits to get limit the memory usage on your server process17:16
SteveAstill, there are all sorts of issues running this on the server17:16
edarHowever running it on the client means the user can do whatever he wants with the doctest17:17
edarthus he can make him/her self pass all the time17:17
SteveAyou said you trusted them!17:17
SteveAif you don't trust the students to mark themselves properly, why would you trust them not to crack your server?17:18
edarto some extent ^^17:18
edarHold on ....17:19
edarI need to get the instigator here, Jeff Elkner17:19
SteveAon an unrelated issue, someone (who was it...?) was talking about using distributed revision control systems to combat plagarism17:20
SteveAif you get your students to do their work using fine-grained checkins to a VCS, then you can inspect the flow of their work later17:20
pcardunethat's an interesting concept17:21
SteveAand see that there is a process of creation going on, rather than things just appearing from nowhere17:21
pcarduneas a student I would hate it, it's like a teacher breathing down your neck 24/7 and they will always know when you did everything at the last minute17:22
floxhello. i try to learn some good features of Zope3 for "presentation" components.17:23
floxwhat about 'zope.formlib'?17:23
floxis it a good start for 'input templates'?17:24
floxand 'zope.viewlet' for display templates?17:24
*** jelkner has joined #zope3-dev17:25
edarthere is the real culprit >_<17:25
baldtrolflox: formlib is the place to go for designing any kind of form.17:26
jelknerj1m: hi jim17:26
J1mHi17:26
baldtrolviewlet has a bit of a different use case.  it's for reusable views, not core to the representation of the current context, but desirable to be displayed there.17:26
jelknerseems like i've started a controversy17:27
jelkneri want doctest quiz17:27
jelknerthey tell me you are trying to talk them out of it17:27
floxbaldtrol: for 'input templates' we should use 'zope.formlib' (except for content components where we use ZCML <browser:editform>)17:31
baldtrolflox: that's my opinion, yessir.  form.Form, form.EditForm and page.Page (not formlib proper, but related) are, in my opinion, the best way to build presentation logic17:32
Theuniis there any elegant way to register a browser:page for multiple interfaces (but not *) without repeating the whole zcml-statement for every interface?17:33
baldtroltheuni: i don't know, but i hope someone says *yes* ;)17:33
Theunihmm. i can of course make a marker interface that i use as an interface that all the interfaces i want to associate extend17:33
Theunii can also make english sentences that are more complicated than they need to be17:33
baldtrolyou should rephrase everything to have yoda-syntax17:34
*** benji has joined #zope3-dev17:34
Theunirephrasing everything you must17:35
baldtrolye-eaa-es.17:36
Theuniyoda: very dark the other side is17:36
Theuniobi wan: shut up. eat your toast.17:36
baldtrolhah!17:37
baldtrolnice17:37
floxbaldtrol: and 'zope.viewlet' is to display some re-usable views inside defined regions of the browser.17:38
baldtrolflox: that's what i've used it for in the past.  you can even embed formlib forms in viewlets, so long as you cleverly swap out the context for actions first.17:38
baldtrolcredit to srichter for giving me tips on how to do that too ;)17:39
*** jelkner has quit IRC17:39
*** RaFromBRC is now known as RaFromBRC|brb17:39
Theunihmm. J1m, btw: do you remember why "ISomething + Something" was choosen over "Something + SomethingImpl" as the standard for naming interfaces and classes?17:40
floxok, i'll concentrate on these: zope.formlib and zope.publisher (BrowserPage)17:41
floxthen i will look at zope.viewlet17:41
floxthks, baldtrol17:41
ignasTheuni: err i'd guess because SomethingImpl is more verbose and kind of ugly? and there is a usecase of "I have this lot of classes and want to make them Web enabled using Zope3"17:42
Theunii see the second reasoning17:42
J1mjelkner, I'm not trying very hard.  I just said they shouldn't do it. Actually, StevaA said they shouldn't do it and I agree.17:42
Theunia friend of mine who happens to know java was a bit surprised by our naming scheme17:42
*** flox is now known as flox|away17:42
mexiKONTheuni, the question is whether you're interface centric or not17:43
Theunibecause the interface is supposed to specify a "something", not a "isomething" whereas the implementation is just a "detail" (as far as i understood that reasoning)17:43
mexiKONTheuni, also, lots of other systems tend to use the ISomething form for interfaces17:43
mexiKONTheuni, right.17:43
J1mTheuni, I never considered the second option, but if I did, I would reject it because I thin kit's ugly.17:43
Theuniic17:43
J1mIFoo is pretty standard in some circles, and it stand out pretty well.17:43
mexiKONyeah, Impl is ugly17:43
mexiKONafaik, .NET uses IFoo17:44
TheunimexiKON:  for which flavor does the "whether you're interface centric" argument stand?17:44
mexiKONand (i could be wrong) some java projects do too17:44
* rocky adds his two cents17:44
rockyIFoo sucks imho, but its a necessary evil17:44
* Theuni takes 0.04 cents. someone has to cover up.17:44
Theunibzz. s/0.04/4/17:45
mexiKONTheuni, interface centric == Foo + SomeFoo;  impl centric:  Foo + IFoo17:45
rockyin java, there are language constructs for interfaces, so its never confusing whether you're dealing with an interface versus a class17:45
J1mI certainly don't like imbedding types in names as a rule. But I made an exception for interfaces.17:45
rockypython doesn't have that luxury17:45
J1mThere's nothing saying you have to follow this pattern.17:45
mexiKONtrue17:45
rockywell... here's the problem17:45
Theuniright. i was just wondering how we came up with it. i'm perfectly fine using it. :)17:46
J1mrocky, right, in Java, classes and interfaces aren't first-class objects.17:46
rockyif some people stop using the IFoo convention, it will get *very* confusing for other people looking at the code right now17:46
J1mThat's one way Java sucks. :)17:46
rockyits my recommendation that zope identify that IFoo is the "preferred" convention in order to keep things a little sane17:46
J1mIn Python Interfaces are first-class objects and classes are almost first-class objects.17:46
rockyi hate it.. but it will certainly reduce confusion17:46
J1mAgreed17:47
Theuniapropos. I think I didn't say "I love Zope 3" today, yet.17:48
*** edar has left #zope3-dev17:49
rockyhehe17:49
* rocky is spending a little time lately trying to convince plone developers that formlib is ready :/17:50
mgedmin"classes are almost first-class objects"? why "almost"?17:51
grahamI think J1m meant interfaces are almost...17:54
mexiKONno, interfaces are first class objects17:55
grahamOkay, I'll shut up17:55
*** ChanServ sets mode: +o srichter17:56
*** alga has joined #zope3-dev17:57
mgedminwhat's second class about classes then?17:57
mexiKONi don't really know. i thought they were first class now17:58
mgedminso did I17:58
J1mclasses don't have their own attributes.17:59
J1mTheir attribute namespace is all mixed up with their instances'17:59
mexiKONhmmm18:00
J1mSo, for example could couldn't write a picklable class.18:00
*** RaFromBRC|brb is now known as RaFromBRC|arb18:00
*** RaFromBRC|arb is now known as RaFromBRC18:00
J1mI don't have time atm for a deeper explanation. Ask SteveA. :)18:00
mexiKONJ1m, ah, right18:00
mexiKONno that already makes sense to me18:00
*** flox|away has quit IRC18:01
mgedminhmm18:01
*** alecm has joined #zope3-dev18:02
mgedminSteveA is away for a stroll and a lunch18:02
harobedhi, what is the roadmap about Zope 3 web site (http://www.modscape.com/zope/v3) ?18:03
mexiKONlooks nice. never heard about it before, though18:04
harobedthread is here : http://mail.zope.org/pipermail/zope-web/2006-March/003767.html18:04
mexiKONharobed, you should ask the relevant ZF committee, namely Martijn Faassen & co.18:06
harobedok18:06
d2mi think the design is used for the zopefoundation.org website18:09
rockyanyone here know if it'd be somehow possible to have the named template lookup be dependent on the current zodb context? right now it seems to only adapt the view18:35
*** rock1 has joined #zope3-dev18:43
*** rocky has quit IRC18:44
*** rock1 is now known as rocky18:44
mexiKONrocky, that's how named templates work. they adapt the thing they're attached to18:45
rockyright, which are views18:46
mexiKONyup18:47
rockyand of course we can't reliably expect looking up local utilities to work in zope2 without passing a real zodb context18:48
*** stub has quit IRC18:49
*** BjornT has quit IRC18:49
mgedmincould someone explain the point of named templates to me?18:52
mgedminif I have to override a view class, then it is pretty simple for me to override the template attribute with a different ViewPageTemplateFile, should I desire so18:52
rockymgedmin: yep18:52
rockythats it18:52
mexiKONmgedmin, nobody says you *have* to use it :)18:53
*** alecm has quit IRC18:53
rockyits gonna be a life saver for plone18:53
mgedminbut some people use them, and I want to know what I'm missing18:54
*** alecm has joined #zope3-dev18:54
mgedmincan skins override named templates for views?18:54
rockynot afaik18:54
rockythere's nothing extraordinary about them18:54
rockythey're useful sometimes, sometimes they're not18:54
mgedmincan I get an example?18:56
mgedminwhen are they useful?18:56
rockymgedmin: well, for us with plone we can now override pageform.pt (the default template used for formlib) with our own pageform.pt that "fits" plone simply by providing our own named template18:57
mgedminwith zcml overrides?18:58
*** BjornT has joined #zope3-dev18:58
*** MJ has quit IRC18:59
rockymgedmin: for us no overrides are necessary since we can adapt zope2/five's BrowserView base class since thats used for all <browser:page> views18:59
*** volvox has quit IRC18:59
*** bradb has quit IRC19:03
*** baldtrol has quit IRC19:04
*** dobee has quit IRC19:18
*** dobee has joined #zope3-dev19:21
*** alecm has quit IRC19:22
*** projekt01 has joined #zope3-dev19:26
*** MJ has joined #zope3-dev19:30
*** harobed has quit IRC19:33
*** projekt01 has left #zope3-dev19:39
*** nathany has quit IRC19:41
*** ignas has quit IRC19:49
*** alecm has joined #zope3-dev19:51
*** Theuni has quit IRC19:57
*** flox has joined #zope3-dev20:06
*** flox is now known as flox|away20:06
*** volvox has joined #zope3-dev20:19
*** dobee has quit IRC20:28
SteveAwhat's a named template?20:38
mgedminzope/formlib/namedtemplate.txt20:39
*** volvox has quit IRC20:41
*** volvox has joined #zope3-dev20:41
*** volvox has quit IRC20:47
*** roym has joined #zope3-dev21:09
*** jinty has quit IRC21:12
*** mkerrin has quit IRC21:17
roymI got the latest trunk, did a mkzopeinstance, and then bin/runzope.21:23
roymI get:21:23
roymfrom zope.app.twisted.main import main21:23
roymImportError: No module named app.twisted.main21:23
roymAm I missing something?21:23
mgedminI can reproduce that21:26
roymIt looks like main.py disappeared from twisted/21:26
benjiroym: did you do a bare "make"?21:27
roymyes21:27
benjihmm, something bad is going on then21:27
*** ChrisW has joined #zope3-dev21:27
mgedminroym: bin/runzope in the instance has a strange SOFTWARE_HOME21:32
mgedmin/usr/lib/python2.4/site-packages21:32
*** rocky has quit IRC21:33
*** dunny has joined #zope3-dev21:33
mgedminmkzopeinstance.py does 'import zope' and then looks into zope.__file__21:33
mgedminon my system this finds the 'zope' package that comes from the python-zope-interface Ubuntu package21:34
*** RaFromBRC is now known as RaFromBRC|away21:42
roymmgedmin: regardless, the import points to a non-existent package (zope.app.twisted.main). Does that mean that the twisted guys have changed their dir structure? Or is main.py supposed to be generated by the make?21:43
mgedminno, it means that mkzopeinstance found the wrong zope package21:44
pcarduneroym: I came across this problem a lot.  A quick fix is to just hack whichever script you want to use. (runzope, zopectl) and specify the software home there21:47
*** gumpa has joined #zope3-dev21:47
roympcardune: thanks  - will do that until the dust settles on this.21:47
mgedminis there a collector issue for this?21:48
*** oferw has joined #zope3-dev21:48
roymCan someone point me to a safe version # that doesn't have this issue?21:51
roymI am getting another error:21:52
roymZopeXMLConfigurationError: File ".../etc/securitypolicy.zcml", line 11.221:52
roymConfigurationError: ('Unknown directive', u'http://namespaces.zope.org/zope', u'role')21:52
* mgedmin doesn't use mkzopeinstance21:52
roymmgedmin: what do you do instead?21:53
mgedminjust run z3.py directly in the checkout21:53
mgedminbut wait, didn't I see this conversation already21:53
mgedminhere on this channel?21:53
mgedminI think someone knowledgeable said mkzopeinstance wasn't supposed to work in a checkout21:54
*** nathany has joined #zope3-dev21:54
roymIt has worked until very recently for me.21:54
mgedminyou are supposed to run 'make install' (or python setup.py install) and then run mkzopeinstance from the installation dir21:54
mgedminmaybe21:55
mgedmindon't trust my memory21:55
roymthe "bare" make does exactly that..21:55
roymie: make install21:55
mgedminum, I don't think so21:56
mgedminit runs setup.py build_ext21:56
mgedmin... and install_data into .21:56
mgedminhmm21:56
mgedminok, I should stop talking about things I do not understand ;)21:56
*** dunny has quit IRC21:56
*** rocky has joined #zope3-dev22:00
*** nathany has quit IRC22:08
*** tarek has joined #zope3-dev22:19
*** alga has quit IRC22:24
roymIs there a way to undo the installation done by "/usr/bin/python install.py install".22:25
roymIt put everything in my site-packages dir and I wanted it elsewhere.22:25
roymie: Zope-3.3.0b122:25
*** mgedmin has quit IRC22:25
benjiroym: there's a command for that, it's called "rm"  :)22:26
roymI appreciate the humor... :)22:26
roymhowever, its mixed up with a lot of debian stuff.22:26
*** tiredbones has quit IRC22:27
*** tiredbones has joined #zope3-dev22:28
roymIn case someone else needs to do this.. here is a way to get a list22:36
roymof the files installed, and then maybe do a cleanout...22:36
roym/usr/bin/python install.py install --root /usr/local/Zope3.tmp22:36
roymcd /usr/local/Zope3.tmp; find usr -type f22:36
*** rocky is now known as rocky|away22:41
*** mgedmin has joined #zope3-dev22:53
*** tarek has quit IRC23:01
*** tarek has joined #zope3-dev23:01
*** alecm is now known as alecm|lunch23:04
*** RaFromBRC|away is now known as RaFromBRC23:07
*** ChrisW has left #zope3-dev23:14
*** gumpa has quit IRC23:14
*** russf has quit IRC23:17
*** Theuni has joined #zope3-dev23:17
*** Bernulf has joined #zope3-dev23:21
pcarduneJ1m: I see you moved zwiki at revision 69045 "Moving zwiki to separate project"  where is this separate project?23:37
J1mzwiki23:38
J1mIt is now a top-level project23:38
J1mare you aware of why?23:38
pcardunenope, i'm not23:39
J1mIt has the same security hole as the one we just fixed in z223:39
pcarduneoh, alright then23:39
J1mI mentioned this on the zope3-dev list23:39
pcardune(I just subscribed) (again)23:40
*** jhauser_ has quit IRC23:46
*** jhauser has joined #zope3-dev23:57

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