IRC log of #zope3-dev for Friday, 2007-06-15

*** tarek has joined #zope3-dev00:00
*** d2m has quit IRC00:11
*** oferw has quit IRC00:27
*** nerdalert has quit IRC00:34
*** pbugni has joined #zope3-dev00:43
*** lucielejard has quit IRC00:48
*** J1m has quit IRC00:52
*** RaFromBRC|lunch is now known as RaFromBRC00:54
*** schwendinger has quit IRC01:23
*** sm has joined #zope3-dev01:41
*** tjs has joined #zope3-dev01:57
tjsis there any way a transaction.interfaces.ISynchronizer can be notified on transaction abortions?01:59
*** norro has quit IRC02:02
tjsseems like the only way to catch a transaction abort is to forego the ISynchronizer and join an IDataManager to the transaction, which is pretty hacky02:06
zenwrylyI'm trying to run the Zope3/trunk tests using "make test" from a svn checkout, but the tests keep failing because zope.app.debugskin, zope.app.fssync, and many others aren't present.  I'm adding them in one by one but I'm wondering if I'm doing anything wrong.  Shouldn't I be able to run "make test" from a Zope3/trunk svn checkout?02:17
tjszenwryly: I'm fairly new to zope3, so this might be wrong, but Id suggest doing a make install, then run the tests via the zope bin test script02:20
tjsthat way everything will be in your path02:20
tjsif you dont want to install potentially broken software use the --prefix option then set your PYTHONPATH up and run the tests on that, then if it fails you can just delete it all, else re-run install without the prefix02:22
zenwrylytjs: these are packages that aren't a part of the Zope3/trunk02:23
tjsah02:23
tjssounds a little odd that their test suites are being run if they are not linked in02:24
* tjs shrugs.02:24
zenwrylyI know I've checked out Zope3/trunk in the past and been able to run the tests02:26
*** malthe_ has quit IRC02:36
*** schwendinger has joined #zope3-dev02:39
*** pbugni has quit IRC03:01
*** jsadjohnson has quit IRC03:11
*** jsadjohnson has joined #zope3-dev03:11
*** yota has quit IRC03:15
*** schwendinger has quit IRC03:19
*** reco has quit IRC03:24
*** jsadjohnson has quit IRC03:39
*** niemeyer has quit IRC03:43
*** johnlr1 has joined #zope3-dev03:47
*** reco has joined #zope3-dev03:47
*** johnlr has quit IRC03:51
*** tarek_ has joined #zope3-dev03:59
*** tjs has quit IRC03:59
*** tarek has quit IRC04:03
*** tjs has joined #zope3-dev04:51
*** J1m has joined #zope3-dev05:06
*** johnlr1 is now known as johnlr05:10
*** stub has joined #zope3-dev05:10
*** RaFromBRC has quit IRC05:10
*** reco has quit IRC05:22
*** jodok has quit IRC05:34
*** J1m has quit IRC05:47
*** huajie has joined #zope3-dev05:55
*** rcrafton has quit IRC06:07
*** alecm has quit IRC06:14
*** reco has joined #zope3-dev07:06
*** rcrafton has joined #zope3-dev07:19
*** afd__ has joined #zope3-dev07:22
*** alecm has joined #zope3-dev07:37
*** baijum has joined #zope3-dev07:39
*** alecm has quit IRC07:48
*** alecm has joined #zope3-dev07:48
*** d2m has joined #zope3-dev07:55
*** tarek_ has left #zope3-dev07:56
*** febb has joined #zope3-dev08:02
*** sorin has joined #zope3-dev08:05
*** sorin is now known as sorindregan08:05
*** yvl has joined #zope3-dev08:08
*** jukart has joined #zope3-dev08:10
*** Aiste has joined #zope3-dev08:10
tjsanyone able to help with a little thread problem?08:13
tjshttp://rafb.net/p/J9i1uM47.html08:13
tjsis a simple daemon thread I wrote08:13
tjsin my test setUp I start it, and in tearDown I call its stopThread() method08:13
tjsbut the test runner tells me08:13
tjsThe following test left new threads behind:08:14
tjs/home/tjs/f2l/var/zope-3.2.0/lib/python/well3/services/tests/test_sms.txt08:14
tjsNew thread(s): [<ShortMessageSpoolDaemon(Thread-1, started daemon)>]08:14
tjsany ideas?08:14
*** jukart has quit IRC08:17
*** whit has quit IRC08:20
*** whit has joined #zope3-dev08:20
*** afd__ has quit IRC08:26
*** Jell-O-Fishi has quit IRC08:35
*** jukart has joined #zope3-dev08:40
*** zagy has joined #zope3-dev08:43
*** Jell-O-Fishi has joined #zope3-dev08:44
*** whit has quit IRC08:58
*** zagy has joined #zope3-dev08:58
*** ghendi has joined #zope3-dev09:07
*** huajie has quit IRC09:12
*** deo has quit IRC09:12
*** deo has joined #zope3-dev09:19
*** rcrafton has quit IRC09:27
*** baijum has quit IRC09:59
*** harobed has joined #zope3-dev10:00
*** tjs has left #zope3-dev10:00
*** yvl has quit IRC10:05
*** malthe has joined #zope3-dev10:06
*** malthe_ has joined #zope3-dev10:25
*** yvl has joined #zope3-dev10:34
*** ghendi has quit IRC10:35
*** malthe_ has quit IRC10:38
*** dobee has joined #zope3-dev10:39
*** malthe has quit IRC10:39
*** baijum has joined #zope3-dev10:45
*** huajie has joined #zope3-dev10:55
*** jodok has joined #zope3-dev11:00
*** bigkevmcd has joined #zope3-dev11:01
*** andrew_m has quit IRC11:01
*** jodok has quit IRC11:09
*** alecm has quit IRC11:11
*** tarek has joined #zope3-dev11:12
*** pcardune has joined #zope3-dev11:14
*** huajie has quit IRC11:16
*** jodok has joined #zope3-dev11:21
*** jodok_ has joined #zope3-dev11:22
*** timte has joined #zope3-dev11:23
*** MJ has joined #zope3-dev11:31
*** norro has joined #zope3-dev11:39
*** jodok has quit IRC11:40
*** yota has joined #zope3-dev11:40
*** MJ is now known as MJ|busy11:51
*** jinty has joined #zope3-dev11:52
*** schwendinger has joined #zope3-dev11:57
*** malthe has joined #zope3-dev12:04
*** philiKON_ has joined #zope3-dev12:05
*** richardkan has joined #zope3-dev12:09
*** gmat has joined #zope3-dev12:11
*** MJ|busy is now known as MJ|out12:12
*** philiKON has quit IRC12:21
*** timte has quit IRC12:29
*** timte has joined #zope3-dev12:32
*** MJ|out is now known as MJ|busy12:37
*** mgedmin has joined #zope3-dev12:48
*** reco has quit IRC13:06
*** ignas has joined #zope3-dev13:07
*** projekt01 has joined #zope3-dev13:07
*** timte has quit IRC13:26
*** timte has joined #zope3-dev13:29
*** dobee has quit IRC13:29
*** Aiste has quit IRC13:31
*** andrew_m has joined #zope3-dev13:32
*** norro has quit IRC13:39
*** dobee has joined #zope3-dev13:41
*** dobee has quit IRC13:53
*** MJ|busy is now known as MJ|lunch13:56
*** huajie has joined #zope3-dev13:56
*** timte has quit IRC13:58
*** timte has joined #zope3-dev14:01
*** timte has quit IRC14:02
*** andrew_m has quit IRC14:15
*** jodok_ has quit IRC14:24
*** MJ|lunch is now known as MJ14:27
*** MJ is now known as MJ|busy14:27
*** Newfie2007 has joined #zope3-dev14:27
*** andrew_m has joined #zope3-dev14:28
*** norro has joined #zope3-dev14:31
*** tonico has joined #zope3-dev14:34
*** norro_ has joined #zope3-dev14:37
norro_hi zopies. i want to do an internal linking inside my object hierarchy (BTreeContainers).14:39
norro_This linking has to be robust when updating the object hierarchy. I read something about an ObjectHub, but that seems to be just a proposal.14:39
norro_So what is the best way to do this? Any hints?14:39
norro_btw: "linking" means providing html-links inside the views14:40
*** b52laptop has joined #zope3-dev14:43
*** huajie has quit IRC14:44
norro_if my question doesn't make sense to you, please also tell me :)14:48
projekt01norro_, see z3c.resource this is a local resource implementation, you can store images in the object annotation. This means the links are always relative to the object.14:51
*** jodok has joined #zope3-dev14:52
*** norro has quit IRC14:53
*** rcrafton has joined #zope3-dev14:55
projekt01rcrafton, moin14:56
*** sorindregan has quit IRC14:56
ccombnorro_: if the link in the view is generated with the absolute_url view, there is nothing to do14:57
ccombYou justs have to make sure your objects are locatable14:57
*** norro__ has joined #zope3-dev14:58
projekt01ccomb, you can't store objects in html14:58
ccombhtml ?14:58
norro__Sry, I had connection problems14:58
ccomb(13:57:08) ccomb: norro_: if the link in the view is generated with the absolute_url view, there is nothing to do14:59
ccomb(13:57:48) ccomb: You justs have to make sure your objects are locatable14:59
projekt01norro_, was asking for store html-links14:59
projekt01norro_, or not14:59
*** sorin has joined #zope3-dev14:59
ccombI understand he just want to provide links to other objects in views14:59
*** sorin is now known as sorindregan14:59
ccombmaybe I'm wrong14:59
projekt01ccomb, Ah, yes, if so, then you are right.15:00
norro__ccomb yes15:00
norro__that's what i want to do15:00
norro__I want to provide HTML-Links inside a view to views of other objects. Those links must not break if the objects are moved15:02
projekt01Do you know your object which you like to generate links for.15:03
norro__yes15:03
projekt01then you can use url = absoluteURL(obj, request) + '/foo.html'15:03
norro__projekt01 hmmm, i think i have to answer 'no' to your previous question then15:06
projekt01which question?15:07
norro__'obj' would have to be some kind of object refernce, i think. I don't know how to do this with zope315:07
norro__the question if i know the object15:07
projekt01How do you know which obj do you like to reference?15:08
projekt01How do you selecting the objects which should get linked?15:08
projekt01Are  you asking for insert links in a WYSIWYG editor?15:09
norro__i know the object, when the user creates the link for the first time. But I don't know how to /track/ the object when it's moved15:09
norro__yes, inside an editor15:10
*** niemeyer has joined #zope3-dev15:10
projekt01that's what I mean. It's impossible to do that.15:10
projekt01because you never know what's happen with the html and links inside. Ok, not impossible but very hard to track.15:11
*** norro_ has quit IRC15:11
projekt01Why not store the objects in the annotation of the object and use relative links form html to the linked object?15:12
ccombthe user enter the link himself?15:12
*** Aiste has joined #zope3-dev15:12
projekt01I implemented a solution in z3c.resource. It offers you  lokal resources including a proxy and a local ++resource++ namespace15:13
norro__ccomb the user selects the object, he wants to create a link to15:14
projekt01norro__, then copy the object to the local resource annotation and use relative links to the objcet, then you are fine.15:15
norro__would that be an actual _copy_ of the object?15:15
projekt01I recommend doing a real copy, because you never know if the original object get deleted.15:16
ccombWhen an object is moved, its intid is changed?15:17
projekt01I guess it's a conceptual question, but most the time image resources used in a html editor has it's own lifecycle.15:17
projekt01ccomb, moved no, copied yes.15:18
norro__projekt01 images are not the problem here. i want to link other documents15:18
norro__ccomb I never heard of intid. that'15:18
norro__that could be a solution15:19
*** jinty has quit IRC15:19
*** gmat has left #zope3-dev15:20
norro__ccomb so intid is a unique id inside the content tree?15:20
dennis_if you copy a persistent object to another container, aren't they still the same object, even if you delete it from one it persist in the other until it is completely unreferenced?15:20
dennis_i put attach my media (pics etc) to the content object, since that is where they belong, but it would be just as easy to also drop a "copy" into a global container with all media content15:22
dennis_(ok maybe I am mixing up deleteing it, and removing it from a container)15:22
ccombnorro_: yes unique inside the whole instance if I remember15:23
ccombso you could provide a view @@intid?id=XX instead of the full path15:23
norro__ccomb. that seems to be what i need. thank you very much15:23
ccombor a traversal adapter ++intid++/id15:23
dennis_norro_ ccomb but the object needs to be in _some_ container for persistence and intids to work, which one will you use ?15:24
*** jfroche has joined #zope3-dev15:24
ccombdon't know how norro's app work15:25
*** jsadjohnson has joined #zope3-dev15:25
dennis_:)15:25
projekt01never register views like @@intid?id=xx, this is a big security problem15:25
norro__dennis_ all my objects are container objects and arranged to a tree15:25
*** MJ|busy is now known as MJ|out15:25
ccombprojekt01: you're right, it's an instead idea, probably a bad idea15:26
ccombinstead → instant15:26
dennis_project01 makes sense, but, isn't actual access to those objects restricted anyway?15:26
projekt01the ++intid++/id is a very bad concept at all if you need ot lookup from html.15:27
projekt01Not if the object/links should appear for public access15:27
ccombbut the view  @@intid?id=xx  could return the real path instead of the object15:27
ccombthat would not be a security problem then?15:28
projekt01even that allows you introspection, but that's probabaly not important for protecting.15:28
dennis_project01 sorry for asking more, but i would expect the objects to be protected by their permissions, and disabling intid?id would only be safer in the sense that you hide the objects more15:28
dennis_just curious about the security and how it works15:29
dennis_oops and i will spell you more with k instead of c )15:29
projekt01If you allow to use ++intid++id, thismeasn you will allow to introspect objects by their ids.15:30
Crippsand that's NOT a good thing ...15:30
Crippswhich is why making uuids for object names is totally fricken' AWESOME! ;)15:30
ccombwhat do you mean by « introspect objects by their ids » ?15:31
projekt01If a object exist, it tells you forbidden access, if a object doens't exist it tells you key error. This will give hacker hints where they can try once more15:31
Crippsccomb: introspect allows you to view all programmatic details of an object.15:31
philiKON_that's why both ForbiddenAttribute and KeyError are system errors15:31
philiKON_the user will only see "A System error occurred"15:31
dennis_projekt01 but why are intids then special then, they could also just try with names through the normal traversing15:31
Crippsphil: I was wondering about that.15:31
ccombCripps: I didn't understand the "by intid" part of introspection15:32
projekt01philiKON, yes, but not if somebody registers ++intid++id as a API15:32
philiKON_it all depends on how it's hooked up15:33
ccombIf the intid view is protected by zope.Public, but the object itself is protected by another permission, the object can be viewed ?15:34
projekt01dennis_, like philiKON, says, we mask this different errors, there is no chance that a users will see the difference.15:34
philiKON_ccomb: no15:34
ccombso where is the security bb?15:34
ccombpb15:34
philiKON_pb?15:34
ccombissue15:34
*** philiKON_ is now known as philiKON15:34
*** alga has joined #zope3-dev15:34
philiKONno idea15:34
projekt01ccomb, it's not forbidden to use ++intid++id as a lookup, it's just not that smart as it looks.15:35
philiKONexcept that i wonder why somebody would want an ++intid++ traverser in the first place15:35
ccombthis kind of view could be used for permalink, could'nt it?15:35
ccombor are there other way to do permalink?15:35
philiKONan ugly permalink15:36
* philiKON wouldn't expose ++ urls to the outside15:36
dennis_while partly on the topic : any apache rewriting rules to disable those from the outside ?  (inside I use ++skin++ and ++vh++)15:37
* mgedmin is with philiKON on this one15:37
projekt01ccomb, your question about security issue; hackers allways try to do things step by step, to find a working url is the first step. I don't say that this is a problem in general.15:37
norro__so philiKON mgedmin do you like the @@intid?id=xx idea more?15:37
mgedminno, I think URLs should be sensible15:38
ccombnorro : not really, it seems :)15:38
philiKONnorro__: that's even worse15:38
mgedmin/articles/about-this-thing.html, etc.15:38
philiKONright15:38
philiKONeven drop the .html15:38
norro__ok, I see15:38
philiKONfirst of all, why would the user care about the fact that it's an "intid"15:38
mgedminwhat are the objects you're linking to, and why do they move around?15:38
philiKONand second, why expose numbers at all15:39
norro__mgedmin the objects are containers and they are moved to alter the structure of the tree15:39
philiKONnorro__: if you use the object filing system15:39
ccombis there a similar problem when using intid for vocabulary tokens ?15:40
philiKONmeaning, you arrange data in hierarchies using folders15:40
philiKONccomb: i don't see which problem is similar to this... ?15:40
ccombtokens are exposed15:40
philiKONwhy is that a problem?15:41
ccombsomeone told this a few lines above15:41
philiKONnorro__: if you imagine a blog application, /blog/2006/02/03/1 would be a sensible URL *and* permalink, no matter how the data is structured hierarchically in folders15:41
philiKONnorro__: actually, that hierarchical structuring is mostly a CMS thing...15:42
philiKONwell, the need of wanting to move around things in hierarchies at least15:42
philiKONccomb: where?15:42
norro__philiKON, but if if I move the blog entry from container /blog/2006/02/03 to container /blog/2006/02/04, the previous created link '/blog/2006/02/03/1' would break, wouldn't it?15:44
philiKONwho says that 2005/02/03 is a folder?15:44
philiKONand why would you move it?15:44
philiKONyou wrote that article once15:44
philiKONon that date15:44
philiKONyou can't change history :)15:44
norro__:)15:45
ccombphiliKON: nowhere, I'm beginning to mix up my ideas :)15:45
*** jpcw2002 has left #zope3-dev15:46
norro__my app _is_ some kind of CMS. The objects I want to move are some kind of steps of an instruction sheet. If I want to rearrange those steps, I sometimes have to move them to another folder15:47
ccomb/blog/2006/02/04 is a handled by a traversal adapter?15:48
ccombassuming that the ++ part is hidden by the rewriter ?15:48
philiKONi don't see a ++ part15:49
dennis_ccomb dont need a new traverser, you could make "blog" a clever container, mgedmin wrote a great doc about that a while ago15:49
philiKONbut yeah, traversal adapter15:49
dennis_mgedmin is it still online?15:49
dennis_(i mean no new ++ namespace)15:49
mgedminif it ever was online, it still is15:49
* mgedmin googles15:49
mgedminperhaps this is what philiKON referred to: http://mg.pov.lt/blog/zope3-custom-traversal.html15:50
philiKONnorro__: rearrangement is ok, you just need to decide whether you want your object hierarchy to be reflected in the URL hierarchy or not15:50
dennis_  "Note that this is the regular view directive, not browser:view." ha! thanks for adding that! ran into that one at first :)15:51
norro__philiKON that seems to be the default behaviour of zope3 and I like the idea to use as much as possible the default way :)15:52
norro__stll trying to get deeper and deeper into the whole zope3 thing15:53
*** jpcw2002 has joined #zope3-dev15:53
philiKONnorro__: buying my book would be a good start :)15:54
projekt01norro__, and don't start with the deepest things ;-)15:55
norro__philiKON i own both editions :)15:55
philiKONgood :)15:55
philiKONyou can use the 1st edition as firewood15:55
* ccomb would like to also have the 1st edition to start a collection :)15:56
philiKONspoiler: the main character dies in the 3rd book15:57
*** whit has joined #zope3-dev15:58
jpcw2002ccomb: i can sell you mine, but i prefer wait price grow up :-)15:58
norro__philiKON while we're at it: when does the third edition enter the market?15:58
philiKONlet's see, i first have to start working on it, ...15:58
norro__I see :)15:58
*** BjornT_ has joined #zope3-dev15:59
*** BjornT has quit IRC15:59
norro__so guys, as a conclusion: thanks you guys for your manifold ideas. I will think about it16:01
*** J1m has joined #zope3-dev16:03
*** BjornT has joined #zope3-dev16:04
*** BjornT__ has joined #zope3-dev16:05
*** BjornT_ has quit IRC16:06
*** MrTopf has joined #zope3-dev16:06
*** reco has joined #zope3-dev16:12
*** whit has quit IRC16:15
CrippsphiliKON: speaking of which, I've got a few more "revisions" for 3rd ed. I'll email them to you when I get the time.16:15
dennis_cripps, also feel free to make a nice site where you blog about zope 3 tips and tricks - i love those :)16:16
philiKONCripps: sure, would be appreciated16:17
Crippsdennis_: hahaha. Yeah, maybe I should ... I've already got a hella awesome svn how-to page up. :P16:17
Crippsdennis_: although, I'm not sure if it's available locally or to the whole world.16:17
dennis_lol you are not sure?16:18
dennis_dont blog about security, i will stick to the book for that :)16:18
ccombSomeone has made an intersting site : http://kelpi.com16:18
Crippsdennis_: nope, not sure. It's hosted at work, but I'm not sure which subnet it's on, I only know the hostname, not the IP, or if that port is allowed traffic on that subnet ...16:18
ccombit's made in zope3, and contains several tips for z316:19
dennis_thanks for the link ccomb!16:19
Crippsdennis_: hahaha ... I'll let my friend Chris do the security blogging ;)16:19
pcardunespeaking of security... why does zope3 authentication have to be so painful (or am I missing something?)16:20
dennis_you are maybe missing something, it works quite nicely i think :)16:20
dennis_anything specific?16:20
ccombpcardune: because it's flexible and pluggable16:21
ccombbut not so difficult16:21
pcardunedennis_: I'm just trying to figure out the simplest way to set up user management in an application16:21
pcarduneyou know... the standard stuff, login, logout, adding and removing users16:22
dennis_do you want to allow self-signup ?16:22
pcarduneno16:22
dennis_off the top of my head, add a pluggable authentication manager to your site manager, enable the (for example) sessions-credentials plugins and principal folder, and then you can add and modify users through the zmi16:23
pcarduneI *think* I have my authentication plugin setup right and my credentials plugin setup right, but alas, login/logout does not work fo rme16:23
pcarduneI think it has something to do with the login/logout views16:24
dennis_register the PAU16:24
pcardunewhich I have yet to figure out how to use16:24
dennis_and dont forget to assign roles or permissions to your new principals16:24
*** whit has joined #zope3-dev16:26
ccombpcardune: I've recently added add a few lines on this in the FAQ, but I guess you're a step beyond?16:26
lisppaste6pcardune pasted "constructor for site with authentication stuff" at http://paste.lisp.org/display/4282016:26
pcarduneI just pasted what I think I've got right16:27
pcarduneccomb: which FAQ?16:27
ccombhttp://wiki.zope.org/zope3/FAQ16:27
ccomb4.416:27
ccombafter that you should be able to create users and login.16:28
ccombBut not  logout16:28
*** alecm has joined #zope3-dev16:28
ccomblogout is in 1.5816:28
pcarduneccomb: ok, i'm checking those out right now16:28
*** reco has quit IRC16:29
CrippsI have a general uuid generator that adapts IContainer, and provides INameChooser ... how would I use this? the adapter is it's *own* package, and I want to use it from all my containers within my main project ...16:29
Crippsit *should* be as easy as "NameChooser = getAdapter(INameChooser,'adapterName')" ... I think.16:30
philiKONnope16:30
philiKONINameChooser(the_container)16:30
dennis_just do  INameChooser( MyContainer )16:30
pcardunetook the words out of my mouth16:30
philiKONname choosers aren't named adapters16:31
philiKONand adapters always need the object that they're adapting as an argument16:31
CrippsphiliKON: so I should just have it registered as an adaptor, and not a *named* adapter?16:31
philiKONright16:31
philiKONsee my book16:31
Crippskk. That makes sense. Which chapter?16:31
*** baijum has quit IRC16:31
Cripps15?16:31
philiKONthe one about containers16:31
philiKONalso, it has an index :)16:31
Crippsheh, yep ... 15. That was off the top of my head ;)16:32
dennis_every time i read some section again i notice something new i was wondering about16:32
pcardunephiliKON: I left my copy at home, any chance you could send me an electronic version of the chapter on security ;)16:32
philiKONi'm afraid i can't16:33
ccombpcardune: you can download the example code from the site16:34
*** MrTopf has quit IRC16:34
ccombhttp://worldcookery.com/files/examples-2.0.1.tgz16:34
pcarduneccomb: that is a very useful piece of information16:34
ccombgrep RecipeNameChooser16:35
*** MJ|out is now known as MJ|busy16:36
*** zez_zez has joined #zope3-dev16:38
*** stub has quit IRC16:49
*** niemeyer has quit IRC16:51
*** kobold has joined #zope3-dev16:53
*** niemeyer has joined #zope3-dev16:54
*** whit has quit IRC16:55
*** schwendinger_ has joined #zope3-dev16:57
*** philiKON has quit IRC16:58
*** philiKON has joined #zope3-dev17:00
*** jfroche has quit IRC17:00
*** jfroche has joined #zope3-dev17:03
*** sorindregan has quit IRC17:06
*** yvl has quit IRC17:10
*** schwendinger has quit IRC17:14
CrippsphiliKON: yeah, after I removed the 'name' section in the adapter registration, and *over-rided* the __init__ and __setitem__ methods for my container, everything worked as expected ... now I just have to fix up the doctests ;)17:24
*** febb has quit IRC17:24
philiKONwhy would you want to override __init__ and __setitem__?17:24
CrippsphiliKON: to set self.nameChooser17:26
Crippsand setitem to call it.17:26
philiKONugh17:26
*** zagy has quit IRC17:27
philiKONwhy?17:27
mgedminwha...?17:27
* Cripps goes back to the book.17:28
mgedminyou use the names chooser externally17:28
mgedminwhen you want to add an item to a container, you do the name chooser dance:17:28
mgedminchooser = INameChooser(container)17:28
mgedminname = chooser.chooseName(suggested_name, item)17:29
mgedmincontainer[name] = item17:29
mgedminyesterday I wondered if zope.app.container ought to have a helper for this17:29
philiKONit should17:29
mgedminsomething like zope.app.container.add(container[, suggested_name])17:29
philiKONaddToContainer(container, obj, suggested_name=None)17:29
philiKONor something like that17:30
philiKONmgedmin: you need obj :)17:30
mgedminduh :)17:30
philiKONbtw, i also think that name choosers should really be multi-adapters for (container, obj)17:30
* mgedmin was probably thinking about container.add(obj, suggested_name=None)17:30
mgedminwhich is hard to do without breaking everyone's custom container implementations17:31
philiKONyeh17:31
*** whit_ has joined #zope3-dev17:31
*** jkakar has quit IRC17:35
dennis_Is there a way to speed up the IUndoInterface.getTransaction( context = MyObj )  so that it is usable? It would be fantastic to be able to show undo information per contect object17:43
Crippsheh ... I'm a moron ... since my custom name chooser adapts IContainer, it "overrides" the default one ... I don't have to worry about a bleeding thing ... zope takes care of everything!17:44
*** whit has joined #zope3-dev17:49
*** ignas has quit IRC17:49
*** whit_ has quit IRC17:49
dennis_or alternatively, can I query the current transaction ID such that I may store it with the annotations of an object when modifying, such that I can use one later to undo something?17:50
*** tarek is now known as cecilia17:56
philiKONdennis_: stay away from zodb undo if you want to imitate versioning17:59
philiKONthat's my advice17:59
dennis_i don't really need versioning (would be wonderful if it were available at little cost of course), but just to prepare for the inevitable editor who says "oops i accidentally clicked yes on both alert boxes without reading and deleted half the site" kind of thing18:01
philiKONthat's what "Undo!" is for: undoing your last transaction18:01
philiKONbut again, it might not be such a good idea to expose it to content editors18:01
dennis_every editor his own last few undos? of course any idea is welcome, you can imagine how people will use it in practice :)18:04
*** cecilia is now known as tarek18:05
*** jkakar has joined #zope3-dev18:09
*** schwendinger_ has quit IRC18:11
*** jinty has joined #zope3-dev18:16
Theunidennis_: the problem is that database level undo is very far away from the application and editors.18:17
Theunidatabase undo might even prohibit any undo although an editor might expect it to work.18:17
*** schwendinger has joined #zope3-dev18:17
Theunidatabase level undo depends so much on what the application does with your data ...18:18
Theunitypically you don't want to revert transactions but do something a bit more high-level18:18
Theunione example would be to take snapshots in your application, e.g. using zc.copy and zc.freeze18:19
Theunithen you could keep old copies around whenever you like.18:19
*** norro__ has quit IRC18:20
*** b52Centos has quit IRC18:20
dennis_checking them out, thanks theuni18:20
*** b52Centos has joined #zope3-dev18:20
mgedminthere's an entire version control system build on top of them: zc.vault18:21
mgedminalthough using it is kind of tricky18:22
dennis_thats a bit overkill perhaps for now for my purpose18:25
dennis_:)18:25
CSWookieI should learn more of the vault.18:25
CSWookieIs there a hook someplace in the adapter registry where I can add my own little sub-registry?  So if something didn't get found it would then look in my thing?18:28
mgedminprobably18:30
mgedminisn't that how local adapters work?18:30
mgedminyou have a bunch of sites, and each has its own adapter registry, and each delegates failed lookups upwards18:30
Crippsmgedmin: doesn't zope look up local adapters first, and then check for framework level adapters?18:31
mgedminI don't know what "framework level adapters" are18:31
Crippsmgedmin: all the generic ones that come with zope (for example: NameChooser)18:31
mgedminah, the global ones? yes18:32
CSWookiemgedmin: Yeah, but I want this without making sites.18:32
mgedminCSWookie: I'm not intimately familiar with zope.component18:32
CSWookieOK.  thanks.18:32
mgedminI have a feeling that you can have your own independent component registries18:32
mgedminI'd go and read some txt files18:32
*** malthe has quit IRC18:33
dennis_my undo was inspired by: http://griddlenoise.blogspot.com/2006/02/gut-feel-comparison-of-code-between.html  , though it seems he limited to delete only, which would be fine for me too18:36
*** MJ|busy has quit IRC18:36
*** pbugni has joined #zope3-dev18:38
*** jodok has quit IRC18:42
* mgedmin puts on a brown paper bag18:46
* Cripps draws a sad face on mgedmin 's paper bag18:49
* dennis_ puts on his robe and wizard hat18:50
Crippsdennis_: I thought I told you never to message me again you fucker.18:51
Cripps;)18:51
dennis_ah crap18:51
Crippsahhh ... bash.org18:51
dennis_you should send me a list of your nicks!18:51
*** rcrafton_ has joined #zope3-dev18:51
*** jkakar_ has joined #zope3-dev18:52
CrippsImma totally have to show this to xbeanx .. he'll shit himself :P18:52
*** jkakar_ has quit IRC18:54
*** jkakar_ has joined #zope3-dev18:54
*** projekt01 has left #zope3-dev18:54
*** rcrafton has quit IRC18:58
mgedminhm, a reliable zodb-level undo would be nice19:02
mgedminI think I tried to use the unto facility in zmi once, got some exception, and wrote it off as not working19:02
*** sm has left #zope3-dev19:02
*** jfroche has quit IRC19:03
J1mUndo is sometimes very useful.19:03
J1mNote that undo, like conflict resolution, violates consistency.19:04
J1mThe history facility would also be very nice.19:04
J1mIt would be nice if every persistent object had a view that displayed a history summary.19:04
mgedminoh yes19:05
mgedmincurrently I use the debugzope console with a hacked script for that19:06
*** alecm has quit IRC19:06
*** jkakar has quit IRC19:06
*** alecm has joined #zope3-dev19:06
*** norro has joined #zope3-dev19:08
*** tarek has quit IRC19:09
*** MacBank has joined #zope3-dev19:12
*** MacBank is now known as MacYET19:12
*** BjornT_ has joined #zope3-dev19:44
*** BjornT has quit IRC19:46
*** harobed has quit IRC19:50
*** sm has joined #zope3-dev19:53
*** schwendinger has quit IRC20:02
*** kobold has left #zope3-dev20:10
*** tonico has quit IRC20:10
*** zez_zez has quit IRC20:14
*** MacYET has left #zope3-dev20:14
ccombEach time I try to play with adapters and annotations, I have permissions problems20:26
ccombI have an adapter called Thumbnail, which adapts from IImage to IThumbnail and write a generated thumbnail into the annotations of the Image20:26
ccombDoes Thumbnail have to be trusted ?20:27
philiKONtrusted adapters20:27
philiKONit's in my book20:27
* pbugni sees a shameless plug :)20:28
pbugnihi philipp20:28
philiKONhi paul20:28
Crippshahaha ... nothing wrong with shameless plugs when they are for *the* definitive guide that's out there :P20:29
pbugniindeed - get the book!20:29
*** pcardune_ has joined #zope3-dev20:30
ccombphiliKON:  thanks I was not sure. I've another problem somewhere else20:30
Crippshahaha. I've already got it ... work bought it for me to use ;)20:30
Crippsit's all nicely tabbed out and everything too (I love post-it tabs)20:31
*** pcardune has quit IRC20:31
*** rcrafton has joined #zope3-dev20:40
*** oferw has joined #zope3-dev20:43
*** rcrafton has quit IRC20:49
*** jukart has quit IRC20:54
*** rcrafton_ has quit IRC20:57
*** mgedmin has quit IRC20:59
*** thruflo has joined #zope3-dev21:00
thruflohey, is it ok to post a newbie qu. here?21:01
Crippsthruflo: only if you ask the question instead of asking if you can ask a question.21:02
thruflo:) trying to be polite21:02
Crippswell, that kind of polite is usually frowned upon ;)21:02
thrufloi'm getting a ComponentLookupError: (<InterfaceClass zope.app.intid.interfaces.IIntIds>, '')21:03
*** oferw has quit IRC21:03
thruflowhilst trying to get a livepage upload demo to work from http://svn.zope.org/zope3org/trunk/src/zorg/live/21:03
*** oferw has joined #zope3-dev21:03
thruflothe line causing is         intIds = zope.component.getUtility(IIntIds)21:04
*** rcrafton has joined #zope3-dev21:04
thrufloin the doc string of the LivePage class i read:21:04
thrufloA livepage is registered for a location. The location is represented21:04
thruflo    by an id. It's up to the implementation to provide an id with the21:04
thruflo    getLocationId method that can be resolved by the getLocationResolver method.21:04
thruflo21:04
thrufloso presumably I need to register the utility with zope.component?21:05
thrufloi've tried creating a Unique ID Utility via the ZMI and I've registered it as something abitrary but that doesn't help21:05
Crippsthruflo: well, you will have to register the utility in your configure.zcml ... you'll probably want to specify a utility name as well.21:06
Crippsalthough, if you're looking for an ID, you'll probably want to use NameChooser instead.21:06
Cripps...that works as an adapter.21:07
* thruflo nods - I've read about NameChooser21:07
Crippsin phil's book? ;)21:07
thruflook, so i need a <utility provides="foo" />21:07
thruflo^ yup :)21:07
thruflomy newbie bible...21:07
*** rcrafton has quit IRC21:08
Crippshahaha. Yeah ... It took me a few times reading through it before stuff started falling into place.21:08
thruflounfortunately just leant it to one of my colleagues for the w/e so don't have as reference atm  :|21:08
thruflotx for the advice...21:09
Crippsif you're using a utility, you'll want to specify a factory/component, and a name21:09
Crippsso: <utility component="myIntID" name="foo.bar" />21:09
Crippsor: <utility factory="module.IntIdFactory" name="my.foo" />21:10
thruflook - is there is a standard unique id utility handy?21:10
Crippswhere module is the name of a file, and IntIdFactory is a factory class, or method, that creates an int ID for you21:10
* thruflo nods again21:11
Crippsthruflo: well, there is a global unique id utility ... it will basically allow you to specify a name, and double check the container to ensure that it's not a double.21:11
Crippser, rather, it's an adapter ... and it works transparently.21:11
thruflogot you on the terminology ;)21:12
CrippsPersonally, I wrote my own NameChooser that generates unicode UUIDs for each object created in a container.21:12
thrufloyup - will presumably want to do that when implementing for real, for now I'd like to see if I can get this livepage setup to work as a proof of concept21:13
Crippsactually, making your own is fairly straightforward.21:14
thruflook21:14
Crippsmine is a total of 100 lines of code (max), doctests, registration, and all.21:14
* thruflo googles21:16
dennis_thruflo you have added a Unique Integer Utility to the site manager of your site, and registered it for interface <InterfaceClass zope.app.intid.interfaces.IIntIds> ?21:20
thruflomaybe not for the Interface21:21
dennis_try that :)21:22
thrufloyes, that's the 'provided interface' in the drop down21:22
dennis_yes21:22
dennis_can you run zopectl, and then 'debug'21:23
*** MJ has joined #zope3-dev21:24
thruflodone, have >>>21:24
*** MJ has quit IRC21:24
dennis_from zope.component import getUtility21:24
* thruflo nods21:25
dennis_from from zope.app.intid.interfaces import IIntIds21:25
dennis_id = getUtility( IIntIds )21:25
thruflozope.component.interfaces.ComponentLookupError: (<InterfaceClass zope.app.intid.interfaces.IIntIds>, '')21:26
thruflosomething's wrong ;)21:27
dennis_for i in root.getSiteManager(): print i21:27
dennis_and   for i in root.getSiteManager()['default']: print i21:27
thruflodefault21:27
philiKONthruflo: simple: you need to create and register an intid utility21:27
thrufloCookieClientIdManager, PersistentSessionDataContainer, PrincipalAnnotation, RootErrorReportingUtility, img21:28
philiKONdennis_: the *contents* of a site manager container and the *registered* components are two absolutely unrelated sets21:28
dennis_so thruflo where exactly did you add your utility ?21:28
dennis_philiKON sure but he just said he added it to the site manager, so it should be there21:28
philiKONah21:28
philiKONperhaps to the wrong one21:29
thrufloerm, perhaps i didn't add it to the site manager21:29
philiKONdoesn't matter21:29
philiKONwhat matter is:21:29
philiKONdid you register it?21:29
thrufloi may not *have* a site manager :p21:29
philiKONjust adding it isn't enough21:29
dennis_philiKON browse up 10-15 lines21:29
dennis_i started with that too21:29
thrufloopen localhost/@@contents.html -> click add Unique ID Utility21:29
thruflovoila21:29
philiKONdennis_: heh, shoulda read the backlog :)21:30
thrufloso I should have a site manager; then I register a uid utility, whether via the ZMI, or by making my own...21:31
philiKONafter reading the backlog, it's not really obvious if thruflo has actually registered the utility21:31
dennis_you should hope I can debug this since I learnt it from your book :)21:31
dennis_i would say not because the debug getUtility fails21:31
*** WebMaven has joined #zope3-dev21:31
philiKONin zopectl dbug the getUtility lookup will always fail21:31
philiKONbecause it deosn't know about local sites  yet21:31
philiKONlet's forget zopectl debug for a moment21:32
philiKONthruflo's last statement confuses me21:32
thrufloah, philiKON may i say thank you very much for your book - digesting it as fast and as often as I can :)21:32
dennis_ah really?21:32
philiKONso21:32
philiKONto be absolutely crystal clear21:32
philiKONyou add a utility21:32
philiKONyou always have to do that21:32
philiKONand then you have to register it21:32
philiKONthose are two separate steps21:32
philiKONinvolving the same object21:32
philiKONit's not an "either ... or"21:33
philiKONand registering the thing actually involves going to the "Registration" tab and clicking the "register" button21:33
thrufloi did do both steps21:34
thrufloadd and then register21:34
*** tarek has joined #zope3-dev21:36
*** zagy has joined #zope3-dev21:37
philiKONok21:38
*** andrew_m has quit IRC21:38
*** richardkan has quit IRC21:43
thruflotx * for the help, will return to this on monday ;)21:46
*** thruflo has quit IRC21:47
*** ktwilight_ has joined #zope3-dev21:57
*** rcrafton has joined #zope3-dev22:00
*** Newfie2007 has quit IRC22:01
*** zagy has quit IRC22:04
*** yota has quit IRC22:09
*** yota has joined #zope3-dev22:11
*** ktwilight has quit IRC22:12
*** rocky is now known as rocky|away22:19
*** tarek has quit IRC22:32
*** andrew_m has joined #zope3-dev22:36
*** pcardune_ has quit IRC22:38
*** zagy has joined #zope3-dev22:43
*** zagy has quit IRC22:44
*** zagy has joined #zope3-dev22:51
*** whit has quit IRC22:52
*** whit has joined #zope3-dev22:52
*** whit has quit IRC22:55
*** whit has joined #zope3-dev22:55
*** zagy has quit IRC22:55
*** d2m has quit IRC23:02
*** bigkevmcd has quit IRC23:20
*** jinty has quit IRC23:26
*** harobed has joined #zope3-dev23:33
*** WebMaven has quit IRC23:47

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