IRC log of #zope3-dev for Saturday, 2005-04-23

*** mohsen has joined #zope3-dev00:02
*** palmTreex has quit IRC00:10
J1msrichter, ayt?00:11
*** hazmat has joined #zope3-dev00:20
*** jbb666 has joined #zope3-dev00:43
jbb666hi im extending this zope3 blog system for fun... I want to add the ability to have tags associated with each entry so you can do keyword searches/browsing.  So I was trying to understand the way zope.index is meant to be used...  Would it make sense for the Blog object (container for entries) to have an attribute which is a KeywordIndex and use the event system to notice changes??00:46
J1mIt could have an attribute that was a list of keywords00:49
J1mYou could then use a keyword index in a catalog to index the keywords00:50
jbb666ok so the catalog would be the preferred home for the keyword index... and since the KeywordIndex doesn't provide a method to get the list of keywords it stores as I noticed I'd use a list to keep track of that myself?00:50
J1mperhaps the keyword index should grow that functionality00:51
jbb666it would be easy enough i think....00:51
J1mOf couse, you want to update/create an interface and provide a doctest00:52
J1mare you a contributor?00:53
J1mwanna be one? :)00:54
jbb666i've _just_ started hacking with Z3...i don't mind submitting patches once I figure I know what im doing ;)00:54
*** gintas has quit IRC00:55
*** Aiste has joined #zope3-dev00:57
*** mp has quit IRC01:00
*** mp has joined #zope3-dev01:04
*** RaFromBRC is now known as RaFromBRC|afk01:07
*** projekt01 has joined #zope3-dev01:20
*** niemeyer has quit IRC01:36
*** tvon has joined #zope3-dev01:39
jbb666ok... for the catalog what is a recommended docid ... should it be the document's path or does it need to be an int?01:40
J1mYou sould read some of the doctests01:40
J1mThe Z3 catalog uses an external int id utility01:40
J1mIt assigns objects integer ids01:41
J1mThat's what the catalog hands to the index01:41
jbb666this is getting complicated  ;)01:41
J1mthe main point is that the application doesn't have to wory about docids01:42
J1mThe indexes use integers, just as in Z201:42
*** J1m has quit IRC01:43
jbb666ahh i think im starting to understand a bit better ;)01:48
jbb666ok not really ;)02:12
*** RaFromBRC|afk is now known as RaFromBRC02:38
*** yota has quit IRC02:56
*** mohsen has quit IRC03:04
*** mohsen has joined #zope3-dev03:07
*** mohsen has quit IRC03:41
*** BjornT has joined #zope3-dev03:43
*** projekt01 has left #zope3-dev03:47
*** BjornT has quit IRC04:29
*** tarek has quit IRC04:33
*** SteveA has joined #zope3-dev04:46
*** SteveA has quit IRC05:27
*** stub has joined #zope3-dev05:32
srichterjbb666: still having troubles?05:49
*** stub has quit IRC07:02
jbb666srichter: im trying the learn by doing approach... right now im not really sure i understand how a catalog is supposed to be accessed from a package07:25
srichterso you first need to setup an intid utility07:26
jbb666my impression after using the system for a while is that im supposed to create it within the default site area?07:26
*** vinsci has quit IRC07:30
*** vinsci has joined #zope3-dev07:31
jbb666then in my application code i would lookup the utility by its interface... to find the Catalog for example...?  I didn't notice that the catalog allows you to add a KeywordIndex however.  Is there some way to do this via ZCML or some kind of package initialization or is that manual steps ?07:31
srichterno, this utility will be in the background07:33
srichterit should not be important for your further needs07:33
jbb666i guess i just dont get how to use the catalog at all then... i searched and searched and found no examples.... in fact i might not even really _need_ a catalog, could probably just get away with a dictionary attached to my Blog object.....07:35
srichterdid you look at README.txt of
jbb666yes... i think its maybe a little high level for me at this time... but i will re-read one more time in an attempt to formulate some more focused qs07:38
srichterwell, you need th eintid utility actually07:38
srichterbecause you need to call catalog.index_doc(initid, document)07:39
jbb666ok so i can call getUtility(IIntIds) to get that.... and call intid.register() for each objcet i want to index to get its id.....07:47
jbb666in that README.txt it shows you instantiating a Catalog() instead of trying to get a persistent instance.. thats one thing thats throwing me off07:49
srichterwell, it creates the catalog without adding it to the DB08:16
*** RaFromBRC has quit IRC08:41
*** hazmat has joined #zope3-dev08:52
*** jbb666 has quit IRC09:03
*** stub has joined #zope3-dev09:09
*** viyyer has joined #zope3-dev09:31
*** d2m has quit IRC09:50
*** stub has quit IRC09:52
*** xerophyte has joined #zope3-dev10:09
*** mooded has joined #zope3-dev10:09
*** tvon has quit IRC10:29
*** tvon has joined #zope3-dev10:31
*** RaFromBRC has joined #zope3-dev10:36
*** RaFromBRC is now known as RaFromBRC|out10:43
*** RaFromBRC|out is now known as RaFromBRC10:43
*** RaFromBRC has left #zope3-dev10:47
*** SteveA has joined #zope3-dev10:49
*** RaFromBRC has joined #zope3-dev10:56
*** RaFromBRC has quit IRC11:00
*** deo has quit IRC11:10
*** BjornT has joined #zope3-dev11:37
*** deo has joined #zope3-dev11:46
*** chk_ has joined #zope3-dev11:49
*** SteveA has quit IRC11:52
*** hazmat has quit IRC11:53
*** mooded has quit IRC11:56
*** mexiKON has joined #zope3-dev12:09
*** th1a has quit IRC12:11
*** BjornT has quit IRC12:18
*** philiKON has quit IRC12:25
*** chk_ has quit IRC12:39
*** chk_ has joined #zope3-dev12:52
*** yota has joined #zope3-dev13:20
*** mohsen has joined #zope3-dev13:25
*** chk_ has quit IRC13:41
*** MacYET has joined #zope3-dev14:18
*** vinsci has quit IRC14:27
*** vinsci has joined #zope3-dev14:27
*** vinsci has joined #zope3-dev14:28
*** deo has quit IRC14:46
*** mooded has joined #zope3-dev14:49
*** mooded has quit IRC15:12
*** mooded has joined #zope3-dev15:53
*** MistaTopfa has joined #zope3-dev16:00
*** C81 has joined #zope3-dev16:14
*** C81 is now known as C8N16:17
*** mooded has quit IRC16:23
*** MacYET_ has joined #zope3-dev16:25
*** MacYET has quit IRC16:33
*** MistaTopfa has quit IRC16:41
*** viyyer has quit IRC16:52
*** mohsen has quit IRC16:56
*** MistaTopfa has joined #zope3-dev17:18
MistaTopfabtw, what is best to use, recent svn or the release?17:20
MistaTopfameans: can something break by using svn?17:20
srichterusually not17:28
srichterC8N: hi17:28
MistaTopfaok, thx, also does not seem to break ;-)17:30
MistaTopfabtw, these key references, are these references like Archetypes ones, thus something which can be used instead of the usual UID-based stuff or is this something completely different?17:31
* MistaTopfa should get rid of the "btw," (btw) ;-)17:31
srichterno clue17:32
srichterread the README.txt17:32
MistaTopfawell, from that I also don't have a clue, though it seems a bit like it though I wonder how it works.. guess, some ZODB magic ;-)17:33
MistaTopfamight ask Jim then17:33
MistaTopfaor just try them..17:33
srichterhold on, I am glancing over the readme pretty quick17:34
srichterdid you look at
C8Nhallo srichter17:36
MistaTopfabut I think if they are used to reference objects this also means to wake up objects once one needs e.g. the URL of them..17:38
srichterMistaTopfa: so yes, it is a reference to the object without directly making it  alink17:39
MistaTopfawonder what happens if you move it17:39
srichterI am pretty sure it is used by the indexing stuff, but I do not know why you would want to use it17:39
srichterJim provided little motivation in the documentation17:39
MistaTopfawell, I just remember that people were thinking about a reference engine at the last Gothenburg conference17:40
MistaTopfaso I wonder if that's the result :)17:40
MistaTopfabut think so, looks like the discussion17:40
MistaTopfathe reason for usage: to keep links up to date if objects move around (as example)17:41
srichterahhh, I see17:43
srichterbut I get this with a direct reference as well17:43
MistaTopfawhat's a direct reference then?17:44
srichterx.y = y17:45
srichterbut I guess this is for containment17:45
srichterso nevermind17:45
srichterwell, mmh, this should work too: x['y'] = y17:45
MistaTopfawell, but wouldn't this mean to wake up all objects when using the references?17:46
MistaTopfamight be problematic with big reference sets17:47
mexiKONwell, the idea of a reference engine is that you can categorize references17:47
mexiKONschooltool has a reference engine for z317:47
MistaTopfaalso this, there need to be metadata17:47
MistaTopfaah, should look at that :)17:47
srichterprobably; this is a reason17:47
mexiKONit's included in schoolbell17:47
mexiKONi would like to see it in x3.217:48
MistaTopfajust writing one for z2, so I wonder if I should port it then.. but if there's one already then the better :)17:48
*** MiUlEr has joined #zope3-dev18:03
C8Nphilipp: you mean in 3.2 :)18:04
srichterMistaTopfa: I think you should port SchoolBell's18:07
srichterit looks really cool18:07
MistaTopfaport to what? to z2?18:07
srichterthe inclusion of teh schoolbell reference engine is a matter of MArk saying it can be ZPL :-)18:07
MistaTopfadownloaded it and will have a look18:08
srichterMistaTopfa: yep18:08
MistaTopfawell, mine is nearly finished actually having plugins, etc.18:08
srichterI see18:09
srichterI think Thomas Foerster had one too18:09
srichterit looked very nice and was pretty powerful18:09
mexiKONC8N, that hasn't been decided yet... :)18:09
srichtermexiKON: yes it has18:09
* mexiKON has to read up18:10
srichterit will be Zope 3.x from now on18:10
mexiKONbig yay18:10
C8N> "It is in our opinion that Zope 3.1 is more than ready for production18:10
C8N> use, which is why we decided to drop the X for experimental. We will18:10
C8N> also continue to work on making the transition between Zope 2 and Zope 318:10
C8N> as smooth as possible. As a first step, Zope 2.8 includes Zope 318:10
C8N> features in the form of Five."18:10
srichteryes, Martijn's explanation has been accepted and adopted18:10
C8Nby martijn, approved by jim18:10
MistaTopfaI dunno if I really need that transition. I think I will just go directly to Z3 then..18:10
mexiKONyeah, i read that expalanation, liked it a lot18:10
mexiKONit expressed what i was thinking all along18:11
mexiKONsrichter, btw, if we ask mark nicely, i think he would say yes18:11
MistaTopfaletting all the z2 cruft behine me ;-)18:11
srichtermexiKON: he has been already asked in an E-mail to the SchoolBell mailing list where he was CCed18:11
srichterMistaTopfa: yep, "Go Zope 3!"18:11
mexiKONah, ok18:12
mexiKONball is in his court then18:12
MistaTopfatrying to but there's a lot of learning still in front of me18:12
srichter"life is peaceful there"18:12
MistaTopfaoh, update finished, need to reboot.. cu later18:13
*** MistaTopfa has quit IRC18:13
*** MistaTopfa has joined #zope3-dev18:29
MistaTopfaseems as if the schoolbell relationship engine is also storing the object directly in the link18:29
srichterbut I think they would happily accept a switch to keyreference18:30
MistaTopfathat's what I understand from the code..18:30
MistaTopfaa LinkSet contains Link objects and these store some metadata and the target object18:31
srichterI know nothing detailed about the engine, so I cannot comment18:31
MistaTopfakeyreferences might be better but still you'd need all the objects to wake up when you need to derefence them (e.g. get the URLs)18:31
srichtermaybe a special reference object could handle this special case though18:32
MistaTopfaI just store the metadata inside the source object as well as the actual URL18:33
MistaTopfawhen the object moves I update this information18:33
MistaTopfamight even be easier in z3 as you have events for that18:33
MistaTopfain z2 it's just a hack ;-)18:33
MistaTopfabut from what I read, schoolbell itself also looks quite nice :)18:34
MistaTopfa(and I like the name ;-)18:34
srichteryeah, it is18:34
*** jbb666 has joined #zope3-dev18:37
VladDracis the zope3 trunk save to develop against?18:42
VladDrachmm svn upping my trunk fails18:45
VladDracok fixed :)18:46
*** mohsen has joined #zope3-dev19:04
*** hazmat has joined #zope3-dev19:19
jbb666how can i get the names of ZPT templates displayed in the traceback?19:38
mexiKONVladDrac, yeah. the trunk will be released soon as 3.119:40
VladDracmexikon ok, co'd a fresh ttrunk - mine was broken for unknown reason19:46
srichtervinsci: yep20:00
srichterjbb666: you can't20:01
jbb666it appears to me that zope.exceptions provides the ability to add supplemental info for things like ZPT but maybe its not plugged into ZPT yet?20:01
jbb666so what am i supposed to do... set a breakpoint somewhere so I can figure out which template its going into?20:01
srichterzope.exceptions is totally generic20:02
srichterJust comment out parts of the template till you narrow it down20:02
srichterit will show you the failing expression, so it is usually easy to find20:02
C8N(19:03:36) srichter: vinsci: yep <- to wich question? o.o20:02
srichterC8N: I meant to address VladDrac20:03
* VladDrac disables srichters tab-key20:04
* VladDrac dives into pau, principals and security 20:04
* C8N sees VladDrac's brain oozing from his ears20:07
* vinsci helps VladDrac 20:08
C8Nvinsci: helping disabling or oozing? ;)20:10
vinscidisabling, I think :)20:11
* VladDrac sticks the tabkey in his ear20:13
VladDracthat'll stop the oozing *and* the nickname confusion!20:13
VladDracsrichter: what's the current state of the pdf on ?20:13
* VladDrac notices a typesetting issue (but I assume they're already fixed)20:14
srichterVladDrac: outdated; I never merged the SAMS version into it20:14
* VladDrac should buy the book (I assume it's in stock now?)20:16
srichteryep, you should20:16
*** Aiste has quit IRC20:18
*** Aiste has joined #zope3-dev20:20
jbb666srichter: well I can apparently... I hooked up zope.exceptions ExceptionFormatter class into the debugskin and it works great.  I also just added some code into the TAL interpreter to display the source file position/filename, etc20:30
srichtermight be worth a bug report or check it in20:31
*** mkerrin has joined #zope3-dev20:40
* MistaTopfa has all the books ;-)20:44
jbb666i found this bug in catalog... basically the interface ICatalogIndex defines __parent__ = zope.schema.Field()    This causes bad stuff to happen when using the DisplaySchemaView...21:07
MacYET_wait for textindexng3 :)21:07
jbb666well, it'll have to use this same UI as well im sure... its nothing major im just learning Z3 by hacking around and noticing things21:08
srichterjbb666: yeah; change it to zope.interface.Attribute()21:27
jbb666does Attribute support constraints?21:31
srichteroh, no, it does not21:35
srichterwell, you can tell the display schema view to ignore the __parent__ attribute21:36
srichterby specifying the fields you do want to show21:36
jbb666in the ZCML?21:36
jbb666i was noticing that.... ok that's probably best.... it might not be a bad idea for display schema's to ignore prefix of __ as thats not likely something a user would want to change....21:36
srichterI agree21:39
srichterplease make a bug report21:39
*** MiUlEr has quit IRC21:42
jbb666i can see there's still a lot of work to be done for z3 ;)21:48
jbb666of course the foundation is solid21:48
srichterjbb666: please become a contributor and help out!21:49
srichterthis way you can make checkins instead of writing bug reports ;-)21:50
srichterplease sign a contributor agreement and send it via E-mail to Jim.21:51
*** MacYET_ has left #zope3-dev21:54
*** MistaTopfa has quit IRC21:56
srichtermkerrin: are you there?21:57
*** gumpa has joined #zope3-dev22:06
srichtermkerrin: hi22:12
mkerrinI am currently working on this Twisted FTP stuff. Lots of fun.22:12
srichterI was just going to ask...22:12
jbb666how do i get an app object from zopectl debug ala Z2?22:13
srichteryou can just use the Python prompt?22:15
srichter>>> from import appsetup22:16
jbb666cool, i created a new KeywordIndex TTW addable and it just indexed my blog entries ;)22:17
srichter>>> app = appsetup.database('Data.fs')22:17
jbb666ok how do I find the obejcts in my site from app?22:18
srichtertry dir(app)22:19
srichtersd never use this kind of analysis22:20
srichterbecause we test things in doctests22:20
srichter>>> root_folder ='Application')22:22
jbb666i just wanted to play ;)22:22
jbb666and i notice that I can't do root_folder.folder_name I have to use root_folder['folder_name'] which is not as nic22:22
jbb666this mode can be very handy sometimes to examine the state of your database22:23
srichterthat was about the worst of Zope 222:25
srichterbecause attributes popped out of nowhere22:25
srichterany containerish object is now a mapping to other objects22:25
srichterwhich is much better defined22:25
jbb666me learning ;)22:25
srichterand allows for much more flexible object naming22:25
srichterno problemo22:26
jbb666ok gonna write a test instead ;)22:26
srichteryes, its much more fun and you write documentation :-)22:29
srichter(so do docfiletests)22:29
jbb666this one involves a placefulsetup so its going to be in a class....22:30
srichterthere are plenty of examples out there doing placefulsetup in a pure docfiletest22:31
jbb666no? i gotta register utiltities and stuff too22:31
*** mohsenX has joined #zope3-dev22:31
srichter>>> from import ztapi22:31
srichter>>> ztapi.addUtility(utility, iface, name=name)22:32
srichterfor placeful equivalents see:22:32
srichter  >>> from import setup22:32
srichter  >>> dir(setup)22:32
srichtersee zope/app.authentication/tests.py22:33
jbb666i find it very useful to use glimpse with the Z3 code base22:34
*** gumpa_ has joined #zope3-dev22:34
srichtersee zope/app.authentication/README.txt22:36
srichterit shows you how to deal with placeful setups22:36
jbb666cool thanks22:37
*** gumpa has quit IRC22:40
*** `anthony has quit IRC22:58
*** txd has joined #zope3-dev23:03
*** `anthony has joined #zope3-dev23:14
jbb666im looking at Z3 book... under Local Utilities.... the Catalog is also a local utility so I guess I should use similar code as queryNextTheme (from Smiley example)23:22
srichteryes, probabkly23:24
srichterthough the trunk has a nicer aPI now :-)23:24
jbb666which API?23:24
jbb666you mean i just got this book and its already obsolete ?!  i want my money back ;)23:25
jbb666what does BBB stand for?23:27
srichterBBB --> backward-compatibility23:28
srichterthe book is aimed at 3.023:28
srichterthe book will work with 3.1, but it will spew many deprecation warnings23:29
jbb666who's the main developer for zope.index and
srichterI think Jim made the last major revision23:39
srichterwe do not have maintainers for core packages23:40
*** vinsci has quit IRC23:46
*** vinsci has joined #zope3-dev23:46
jbb666ok thats enuf for one day....23:48
srichterjbb666: btw, where is the blog located?23:49
jbb666in src/zblog...23:50
jbb666or yuou mean via svn? i am using someone elses blog and extending it for kicks23:51
srichterno, where did you download the code23:51
srichteryeah, SVN23:51
srichterI need to ask Michael to move it to Zope's repo23:53

Generated by 2.15.1 by Marius Gedminas - find it at!