IRC log of #zope3-dev for Thursday, 2007-12-20

*** hazmat has joined #zope3-dev00:04
*** BjornT has quit IRC00:05
*** hazmat has quit IRC00:09
*** d2m has quit IRC00:09
*** tarek has quit IRC00:11
*** amit_am has left #zope3-dev00:11
*** jodok has quit IRC00:12
*** WebMaven has quit IRC00:14
*** tseaver has quit IRC00:15
*** jodok has joined #zope3-dev00:16
*** quodt has quit IRC00:19
*** jodok_ has joined #zope3-dev00:21
*** hazmat has joined #zope3-dev00:24
*** mgedmin has quit IRC00:26
*** ignas has joined #zope3-dev00:26
*** ignas has quit IRC00:30
*** ignas has joined #zope3-dev00:31
*** regebro has quit IRC00:31
*** jodok has quit IRC00:37
*** jodok_ is now known as jodok00:44
*** hazmat has quit IRC00:48
*** lucielejard has quit IRC00:56
*** reco has joined #zope3-dev01:16
*** norro has quit IRC01:18
*** Aiste has quit IRC01:21
*** timte has quit IRC01:22
*** benji has quit IRC01:25
*** natea|boston has quit IRC01:28
*** ktwilight has joined #zope3-dev01:40
*** thruflo has quit IRC01:46
*** jodok has quit IRC01:49
*** ktwilight_ has quit IRC01:54
*** sp0cksbeard has quit IRC01:59
*** dobee has joined #zope3-dev02:01
*** nathany has joined #zope3-dev02:01
*** dobee has quit IRC02:27
*** J1m has quit IRC02:36
*** nathany has quit IRC02:37
*** ignas has quit IRC02:52
*** stub has joined #zope3-dev02:55
*** ruda_porto has quit IRC03:06
*** lisppaste6 has quit IRC03:09
*** strichter has joined #zope3-dev03:11
*** niemeyer has quit IRC03:26
*** srichter has quit IRC03:27
*** alecm has quit IRC03:31
*** hazmat has joined #zope3-dev03:31
*** replicant has joined #zope3-dev03:33
*** hazmat has quit IRC03:34
*** replicant has quit IRC03:35
*** greenman has quit IRC03:47
*** greenman has joined #zope3-dev03:47
*** hazmat has joined #zope3-dev03:48
*** natea|boston has joined #zope3-dev03:51
*** ccomb has quit IRC04:05
*** ktwilight has quit IRC04:06
*** ktwilight has joined #zope3-dev04:07
*** ktwilight has quit IRC04:10
*** ktwilight has joined #zope3-dev04:10
*** natea|boston has quit IRC04:35
*** greenman has quit IRC04:53
*** RaFromBRC has quit IRC05:22
*** hazmat has quit IRC05:28
*** benji has joined #zope3-dev05:46
*** ktwilight has quit IRC05:52
*** hazmat has joined #zope3-dev05:52
*** ktwilight has joined #zope3-dev05:52
*** greenman has joined #zope3-dev05:54
*** rcrafton has quit IRC05:58
*** benji has quit IRC06:06
*** stub has quit IRC06:08
*** stu1 has joined #zope3-dev06:08
*** stu1 is now known as stub06:08
*** fcorrea has quit IRC06:18
*** ktwilight has quit IRC06:21
*** ktwilight has joined #zope3-dev06:22
*** ktwilight has quit IRC06:29
*** ktwilight has joined #zope3-dev06:29
*** ktwilight has quit IRC06:33
*** ktwilight has joined #zope3-dev06:34
*** ktwilight_ has joined #zope3-dev06:39
*** ktwilight has quit IRC06:40
*** philiKON_ has joined #zope3-dev06:43
*** philiKON has quit IRC06:51
*** baijum has joined #zope3-dev07:26
*** ktwilight_ has quit IRC07:29
*** ktwilight_ has joined #zope3-dev07:29
*** hazmat has quit IRC07:52
*** jukart has joined #zope3-dev08:04
*** ktwilight_ has quit IRC08:09
*** ktwilight_ has joined #zope3-dev08:10
*** d2m has joined #zope3-dev08:11
*** ktwilight_ has quit IRC08:14
*** ktwilight_ has joined #zope3-dev08:14
*** jukart has quit IRC08:16
*** ktwilight_ has quit IRC08:20
*** ktwilight_ has joined #zope3-dev08:20
*** ktwilight_ has quit IRC08:36
*** ktwilight_ has joined #zope3-dev08:37
*** __mac__ has joined #zope3-dev08:40
*** jukart has joined #zope3-dev08:41
*** hdima has joined #zope3-dev08:42
*** timte has joined #zope3-dev08:43
*** sorin has joined #zope3-dev08:46
*** sorin is now known as sorindregan08:46
*** jodok has joined #zope3-dev08:52
*** natea|boston has joined #zope3-dev09:00
*** quodt has joined #zope3-dev09:02
*** __mac__ has quit IRC09:12
*** __mac__ has joined #zope3-dev09:13
*** stub has quit IRC09:16
*** strichter has quit IRC09:23
*** zagy has joined #zope3-dev09:26
*** BjornT has joined #zope3-dev09:31
*** greenman has quit IRC09:35
*** yvl has joined #zope3-dev09:42
*** ktwilight_ has quit IRC09:57
*** ktwilight_ has joined #zope3-dev09:57
*** zagy has quit IRC09:59
*** ktwilight_ has quit IRC10:02
*** ktwilight_ has joined #zope3-dev10:03
*** dobee has joined #zope3-dev10:08
*** pelle__ has joined #zope3-dev10:32
*** zagy has joined #zope3-dev10:32
*** tarek has joined #zope3-dev10:34
*** norro has joined #zope3-dev10:50
*** stub has joined #zope3-dev11:18
*** harobed has joined #zope3-dev11:30
*** ktwilight_ has quit IRC11:34
*** ktwilight_ has joined #zope3-dev11:34
*** ktwilight_ has quit IRC11:40
*** ktwilight_ has joined #zope3-dev11:41
*** benji has joined #zope3-dev11:44
*** regebro has joined #zope3-dev11:54
*** ccomb has joined #zope3-dev11:56
*** timte has quit IRC11:58
*** timte has joined #zope3-dev12:01
*** timte has quit IRC12:05
*** greenman has joined #zope3-dev12:05
*** MJ has joined #zope3-dev12:11
*** malthe has joined #zope3-dev12:14
*** dunny has quit IRC12:17
*** mkerrin has joined #zope3-dev12:25
*** timte has joined #zope3-dev12:30
*** ktwilight_ has quit IRC12:35
*** ktwilight_ has joined #zope3-dev12:35
*** dunny has joined #zope3-dev12:36
*** ktwilight_ has quit IRC12:41
*** ktwilight_ has joined #zope3-dev12:41
*** norro_ has joined #zope3-dev12:45
*** ktwilight_ has quit IRC12:46
*** ktwilight_ has joined #zope3-dev12:46
*** ktwilight_ has quit IRC12:50
*** ktwilight_ has joined #zope3-dev12:50
*** ktwilight_ has quit IRC12:54
*** amit_am has joined #zope3-dev12:57
*** ktwilight_ has joined #zope3-dev12:57
*** yvl has quit IRC12:59
*** yvl has joined #zope3-dev13:00
*** ignas has joined #zope3-dev13:02
*** jpcw2002 has joined #zope3-dev13:03
*** BjornT has quit IRC13:04
*** jpcw2002_ has joined #zope3-dev13:21
*** jpcw2002_ has left #zope3-dev13:25
*** malthe has quit IRC13:25
*** jpcw2002_ has joined #zope3-dev13:25
*** jpcw2002 has quit IRC13:28
*** rocky has joined #zope3-dev13:51
*** ktwilight has joined #zope3-dev13:52
*** ktwilight has quit IRC13:55
*** dunny has quit IRC13:55
*** ktwilight has joined #zope3-dev13:56
*** ktwilight has quit IRC14:01
*** ktwilight has joined #zope3-dev14:01
*** ktwilight has quit IRC14:05
*** ktwilight has joined #zope3-dev14:05
*** ktwilight has quit IRC14:08
*** ktwilight has joined #zope3-dev14:09
*** ktwilight has quit IRC14:13
*** ktwilight has joined #zope3-dev14:13
*** yvl has left #zope3-dev14:14
*** benji has quit IRC14:24
*** b52laptop has quit IRC14:25
*** b52laptop has joined #zope3-dev14:25
*** greenman has quit IRC14:41
*** ktwilight has quit IRC14:42
*** ktwilight has joined #zope3-dev14:42
*** mgedmin has joined #zope3-dev14:43
*** BjornT has joined #zope3-dev14:49
*** gimni has joined #zope3-dev14:50
*** markusleist has joined #zope3-dev15:00
*** dobee has quit IRC15:15
*** rcrafton has joined #zope3-dev15:18
*** dobee has joined #zope3-dev15:19
*** hazmat has joined #zope3-dev15:22
*** benji has joined #zope3-dev15:37
*** mgedmin has quit IRC15:48
*** faassen has joined #zope3-dev15:55
*** gstratton has joined #zope3-dev16:02
*** lucielejard has joined #zope3-dev16:04
*** markusleist has quit IRC16:15
*** jpfarias has joined #zope3-dev16:23
jpfariasgood morning16:24
*** stub has quit IRC16:24
benjigood morning, jpfarias16:24
jpfariasI have a question: how do I find the objects from some class in my tree of objects so that I can filter them by some attributes?16:25
jpfariashey benji, how are u doing?16:25
benjiquite good16:26
jpfariascool16:27
jpfariasu know how do I do that?16:27
benjiit sounds like you want an index16:27
jpfariasoh man16:27
jpfariasI had problems with indexes before16:27
jpfariaswanted to avoid if possible16:27
jpfariasbut if that is best solution16:27
benjiI've had problems with cars before, but guess how I got to work today. ;)16:27
jpfariaslol16:27
jpfariasindeed16:27
jpfariasu got a good point :-)16:27
jpfariasso16:28
jpfariasI may have done something wrong before16:28
jpfariascause they didn't work for me16:28
benjiI don't know much about catalogs and indexes, let me see if I can find a good example.16:28
jpfariasahahaha16:28
jpfariasseems no one knows about them16:28
jpfariaswhen I had this problem back then16:28
jpfariasno one knew how to fix16:28
*** ktwilight has quit IRC16:30
*** ktwilight has joined #zope3-dev16:31
faassenjpfarias: this isn't the best tutorial in the world, but it does have some examples from a Grok perspective: http://grok.zope.org/minitutorials/searching.html16:31
faassenjpfarias: Grok has some shortcuts that make it easier to set up the catalog. in straight zope 3 you first have to set up the intids utility, then the catalog, then the indexes in there.16:31
benjithe zope.app.catalog README.txt looks reasonable (http://svn.zope.org/zope.app.catalog/trunk/src/zope/app/catalog/README.txt?rev=76936&view=markup)16:32
jpfariasfaassen: yeah16:32
amit_amjpfarias: zc.catalog extendcatalog and FilterExtend could help16:33
*** ktwilight has quit IRC16:33
*** ktwilight has joined #zope3-dev16:34
*** J1m has joined #zope3-dev16:34
amit_amjpfarias: you define a filter like def jobsearchfilter(extent, uid, obj): return uid and vertifaces.IJobSearch.providedBy(obj)16:35
amit_amsorry16:36
amit_amfilterxx(extend, uid, obj):16:36
amit_amreturn IMyInterface.providedBy(obj)16:36
amit_amreturn uid and IMyInterface.providedBy(obj)16:37
*** ktwilight has quit IRC16:37
*** mgedmin has joined #zope3-dev16:37
*** ignas has quit IRC16:38
*** ignas_ has joined #zope3-dev16:38
*** ktwilight has joined #zope3-dev16:40
*** reco has quit IRC16:43
*** baijum has quit IRC16:43
*** reco has joined #zope3-dev16:43
*** ktwilight has quit IRC16:44
*** ktwilight has joined #zope3-dev16:44
*** norro_ has quit IRC16:46
*** norro_ has joined #zope3-dev16:46
*** replicant has joined #zope3-dev16:46
*** hazmat has quit IRC16:46
*** sorindregan has quit IRC16:48
*** replicant is now known as hazmat16:48
*** ChanServ sets mode: +o hazmat16:48
hazmatjpfarias, what was your problem?16:49
jpfariasso16:49
jpfariasI will make a xmlrpc view on my app16:49
jpfariasto upload info from somewhere else16:49
jpfariasthe info will update objects of a class16:50
jpfariasbut I don't know where the object is in the objects tree16:50
jpfariasmy idea is to find it by searching all objects of that class for some attributes16:51
jpfariaslike name and email16:51
jpfariasgot it?16:51
jpfariasmy english not so good...16:52
jpfariaslol16:52
benjijpfarias: I don't know enough about your app to be sure, but it sounds like int IDs would help you; you can get a unique integer that you can use to look up an object with16:53
jpfariasyeah16:53
*** __mac__ has quit IRC16:53
jpfariasbut16:53
jpfariasthe application sending the data16:54
jpfariasdoes not know that id16:54
jpfariasit knows the name and email :-)16:54
benjiand the name and email together are unique?16:55
jpfariasyes16:55
benjisounds like you need an index (or you can roll your own with a BTree)16:55
jpfariasI'll try the index16:56
jpfariasgod help me....16:56
benjihonestly, if you're not doing general purpose searching, a straight BTree seems reasonable to me16:58
jpfariasyeah16:58
jpfariasbut16:58
jpfariasthat always confuses me16:59
jpfariasso16:59
jpfariasI already add this object to a container when it is created16:59
jpfariasis it ok to add to another BTree?16:59
jpfariasthis gives me a 2nd problem16:59
jpfariaswhen I remove the object from its original container17:00
jpfariasI need to delete it from the BTree too?17:00
ignas_yes, so you'd need an IObjectRemoved subscriber17:01
ignas_indexes take care of "unindexing" automatically17:01
ignas_but are a bit more complex/complicated to set up17:01
jpfariaslol17:01
jpfariasok17:01
jpfariasso17:01
ignas_so you'd have a "name + email" index17:02
jpfariaswhat I can do17:02
jpfariasis make the BTree17:02
jpfariasadd existing objects there with the (name, email) key17:02
jpfariasthen make 2 subscribers17:02
jpfariasfor adding and removal17:02
jpfariasright?17:02
ignas_1 subscriber17:02
ignas_oh17:02
ignas_yeah17:02
ignas_you can add 217:02
ignas_you probably should ;)17:02
jpfariasso17:03
jpfariaswhat happens if object is modified17:03
jpfariaslike17:03
jpfariasguy mistyped email17:03
ignas_name or email get's changed17:03
jpfariasand fixes it later17:03
ignas_IObjectModified subscriber17:03
jpfarias3rd subscriber?17:03
jpfariaslolll17:03
ignas_most of the Zope3 editforms fire that event for you17:03
jpfariassee, it never simple17:03
ignas_it is simple17:03
jpfariashahahaha17:03
ignas_it's 3 functions17:03
jpfariaswell yeah17:04
ignas_that perform very basic operations17:04
jpfariasbut I could have forgotten the other 217:04
jpfariasyeah17:04
jpfariasI know!17:04
ignas_hmm17:04
jpfariaslol17:04
ignas_the modified subscriber is a bit complicated ;)17:04
jpfariashmm17:04
ignas_you will have only the new name and email17:04
jpfariasoh man17:05
jpfariashmm17:05
jpfariaswell17:05
ignas_so unless your index is bidirectional17:05
ignas_modified subscriber will be slow17:05
jpfariasthe btree can give me the values17:05
jpfariasso I can search the objects there17:05
ignas_yes, but it's slow to iterate through all the values17:05
ignas_and yes - zc.catalog does that for you17:05
jpfariaslol17:05
ignas_but it's more complicated to set up ;) at least IMHO17:06
jpfariasso we are back to catalogs17:06
jpfariasok17:06
jpfariascan't be too complicated17:06
*** Aiste has joined #zope3-dev17:07
ignas_i don't even know how to query zc.catalog without hurry.query or whatever it's called17:07
jpfariasyeah17:07
jpfariasI used to use hurry.query too17:07
ignas_i do the values_to_objects[''] on the index most of the time17:08
ignas_but my usecases are quite crazy17:08
jpfariasso, I would like to have a How To on setting up a new catalog for existing objects17:08
jpfariascause I can't just kill all my zodb just to add this new requirement17:08
ignas_:) will svn diff do?17:08
jpfariasuh?17:09
ignas_well - all the code i write17:09
ignas_is available publicly in an svn repository17:09
jpfariasoh17:09
ignas_so i can link you to a diff that adds a catalog17:09
ignas_it won't be precisely what you need17:09
jpfariasplease do it17:09
jpfariasit a starting point17:09
jpfarias:-)17:09
ignas_jpfarias: http://source.schooltool.org/trac/browser/trunk/schooltool/src/schooltool/generations/evolve22.py?rev=685417:12
ignas_is the best i could find at the moment17:12
ignas_and evolution script that adds the catalog17:12
ignas_you might have to browse around to find some functions like setUpUtilities17:12
ignas_though, or just write some code that sets up these local utilities on the site17:13
ignas_i think they must be local utilities, because they have persistent data on them ...17:13
jpfariasok17:14
*** amit_am has left #zope3-dev17:17
*** amit_am has joined #zope3-dev17:17
jpfariasdo u mind if I steal ur utility.py code ? ;-)17:21
*** jpcw2002_ has left #zope3-dev17:21
*** jpcw2002 has joined #zope3-dev17:21
Theunihmm17:23
Theuniinteresting17:23
Theuniaccessing __dict__ of a ghost doesn't load the state17:23
*** pelle___ has joined #zope3-dev17:26
*** pelle___ has quit IRC17:27
benjithat is interesting17:28
benjiI would, at first glance, think wrong as well17:28
benji(wrong in as a bug, not wrong in that you're halucinating)  ;)17:28
mgedminit's what I've always seen17:29
ignas_jpfarias: GPL17:29
mgedmindoesn't ghost load its state only when you try to access a missing attribute?17:29
ignas_jpfarias: be careful when copy pasting, or it will devour all your code17:29
*** hdima has quit IRC17:32
ignas_jpfarias: by the way - look for hurry or zc packages, i would be very surprised if faassen didn't reimplement these utilities in some other package17:34
*** pelle__ has quit IRC17:43
*** lisppaste6 has joined #zope3-dev17:49
*** Basti has quit IRC17:50
*** Basti has joined #zope3-dev17:50
*** ktwilight has quit IRC17:52
*** ktwilight_ has joined #zope3-dev17:52
*** philiKON_ is now known as philiKON17:52
*** lisppaste6 has quit IRC17:53
*** lisppaste6 has joined #zope3-dev18:00
romanofskiis the layer in the resourcelibrary anyhow recognized? I registered two resourcelibraries with the same name for different layers and the skin uses only the last registered layer18:00
romanofski:(18:00
*** thruflo has joined #zope3-dev18:04
*** ktwilight_ has quit IRC18:07
*** ktwilight_ has joined #zope3-dev18:08
*** ktwilight_ has quit IRC18:10
*** ktwilight_ has joined #zope3-dev18:10
*** ktwilight_ has quit IRC18:13
jpfariasignas_: hey18:18
jpfariasI'm getting this error when I run ask zope to evolve18:18
jpfariasZODB.POSException.ConnectionStateError: Shouldn't load state for 0xa2bc when the connection is closed18:18
ignas_hmm18:19
jpfariaswait18:19
jpfariasI restarted zope18:19
jpfariasnow it gave me different error18:19
jpfariaslol18:19
*** pyqwer has joined #zope3-dev18:19
jpfariasAttributeError: 'module' object has no attribute 'getSiteManager'18:19
jpfariasin the setSite() call18:20
ignas_jpfarias: different Zope318:20
jpfariashmm18:20
jpfariashold one18:20
jpfariashold on18:20
jpfariasI mistyped something here18:20
jpfariaslol18:20
jpfariasyeah18:21
jpfariasstill getting the Connection18:21
jpfariasConnectionStateError18:21
ignas_my guess would be broken objects18:21
ignas_but i don't know for sure18:21
ignas_i have seen these before though18:22
jpfariashow do I get rid of broken objects?18:22
jpfarias:-)18:22
mgedminjpfarias: pastebin the full traceback pls18:23
*** __mac__ has joined #zope3-dev18:24
jpfariashttp://paste.plone.org/1869718:24
*** __mac__ has quit IRC18:25
ignas_emm - are you sure it's evolution script that does that?18:26
*** dobee has quit IRC18:27
ignas_was it even executed?18:27
jpfariasyeah18:27
ignas_do you get the exception when starting zope or when making a request?18:27
jpfariasI've put some prints now18:27
jpfariasit gets that when it is creating the catalog and registering it18:27
ignas_but i can't see the catalog creating lines in the traceback18:27
jpfariasindeed18:27
jpfariasweird18:28
jpfariashttp://paste.plone.org/1869818:28
jpfariasline 718:28
jpfariashas the print 'past set site'18:28
jpfariasmeans set site worked18:29
jpfariaslemme paste the code18:29
ignas_not just set site18:29
ignas_it means that the evolution script ran to the end i'd guess18:29
ignas_ok18:29
ignas_maybe not ;)18:29
jpfariashttp://paste.plone.org/1869918:30
jpfariasit prints the 'past set site'18:30
jpfariasbut not the 'past setup utilities'18:30
ignas_do you have an int id utility already set up?18:31
ignas_i see you skipped it in the script18:31
ignas_and i think catalog needs it to work properly18:31
jpfariasyeah18:31
jpfariasintid already exists18:32
*** romanofski has quit IRC18:32
ignas_and "app" is really a site18:32
jpfariasyeap18:32
jpfariaswell18:33
jpfariasno18:33
jpfariasapp is the module18:33
jpfariasapp.bgweb is the site18:33
ignas_i'd import pdb in there and try stepping ;)18:33
jpfariashahahaha18:33
ignas_i meant obj18:33
jpfariasyeah18:33
jpfariasobj is the site18:33
jpfariasman18:33
jpfariasthis makes me sad....18:33
ignas_yep ZODB seems easy on the surface18:34
ignas_but is a tricky and dangerous beast18:34
jpfariasworst thing is I can't dump the "good" objects to another zodb instance18:34
jpfariascan I?18:34
mgedminpaste.plone.org gives me a PHP error18:35
ignas_i am not sure about it18:35
jpfariasoh man18:35
ignas_my approach to solving ZODB problems up until now was18:36
jpfariasu gotta be kidding me18:36
ignas_find the offending object18:36
ignas_that i have moved to the wrong place18:36
jpfariasI forgot to import UtilitySpecification18:36
ignas_:)18:36
jpfariasthe error message was really helpful here, don't u think?18:36
ignas_nope, not really18:36
jpfariasyeah, I was being sarcastic :-)18:37
ignas_i know18:37
jpfariaslol18:37
ignas_you should write unit tests for evolution scripts anyway18:37
jpfariasreally?18:38
ignas_and they are quite good at spotting missing imports18:38
ignas_YES, really18:38
jpfariashow do I do that?18:38
jpfariasnever saw one18:38
jpfariaslol18:38
ignas_http://source.schooltool.org/trac/browser/trunk/schooltool/src/schooltool/generations/tests/test_evolve22.py?rev=685418:38
mgedminwait, your evolution script had a setSite()18:38
mgedminyay18:38
mgedminthat explains the ConnectionStateError18:38
jpfariasyes, indeed18:38
jpfariaswell18:39
*** dobee has joined #zope3-dev18:39
jpfariasproblem was a missing import18:39
jpfariasnot the setSite18:39
jpfarias:-)18:39
jpfariasnow it worked just fine18:39
mgedminwhat happens:18:39
mgedmin1. zope opens a db connection for evolution scripts18:40
mgedmin2. your script calls setSite(a_persisten_object_loaded_from_that_db_connection)18:40
mgedmin3. your script throws an exception18:40
mgedmin4. your script does NOT have a try: finally: setSite(None)18:40
mgedmin5. zope evolution code does have a try: finally: close the db connection18:40
*** __mac__ has joined #zope3-dev18:40
mgedmin6. zope tries to log the error in some error reporting utility18:40
*** __mac__ has quit IRC18:41
mgedmin7. zope tries to look for local utilities in the site18:41
jpfariasoh man18:41
mgedmin8. site is a persistent object loaded from a connection that is now closed18:41
jpfariasno one told me that :-)18:41
mgedmin9. you get a ConnectionStateError18:41
jpfariasyeah18:41
jpfariasI see now18:41
mgedminI'm just guessing about steps 5 and 6, actually18:41
mgedminbut it would make sense18:41
jpfariasindeed18:41
jpfariasbtw18:41
jpfariasdo I need to setSite(none) in the end of evolution script?18:42
ignas_it works without it18:42
ignas_but you could18:42
jpfariasok18:42
hazmatcan zope.configuration load zcml from zipped eggs?18:42
ignas_I think so18:42
* mgedmin doubts it18:42
mgedminoh, cool!18:42
mgedminjpfarias: if you call setSite, then you must call setSite(None) afterwards!18:43
*** Basti has quit IRC18:44
*** _wiwi_ has joined #zope3-dev18:44
mgedminunless you're doing it from inside the zope publisher, which takes care of it for you18:44
mgedminbut outside request processing, yes18:44
*** alecm has joined #zope3-dev18:44
mgedminI also suggest doing it with try: ... finally: setSite(None)18:44
hazmathmmm.. i don't see any support for it in the include config step.. so probably not18:45
*** norro_ has quit IRC18:46
mgedminzope generally isn't zip-friendly18:46
jpfariashmm18:47
mgedmindidn't I see checkins in ZConfig adding support for loading schemas from zip files?18:47
jpfariasI would better do try: except: traceback.print_exc(); setSite(None)18:47
jpfarias:-)18:47
mgedminjpfarias: no18:48
jpfariasI want to see what happened18:48
ignas_you will see18:49
mgedminah, well, for debugging purposes, feel free18:49
ignas_zope will show you if site will be None18:49
jpfariasyeah18:49
* mgedmin would also add a raise after the setSite(None)18:49
jpfariashmm18:49
jpfariasso I can just try / finally18:49
* mgedmin would instead do try: ... except: traceback.print_exc(); raise; finally: setSite(None)18:49
jpfariassetSite(None)18:49
jpfariasand then raise18:49
jpfarias?18:49
jpfariaswell18:50
jpfariastry/except/finally sucks on py2.418:50
jpfariasneed to nest 2 levels18:50
mgedminoh, that was in 2.518:50
jpfariasz3 is 2.418:50
jpfarias:-)18:50
*** thruflo_ has joined #zope3-dev18:50
mgedminanyway, the traceback.print_exc() is a debugging hack and should never be committed to any repository18:51
jpfariaslol18:51
jpfariasI have tons of it on my code18:51
jpfarias:-)18:51
* mgedmin makes a note not to hire jpfarias18:52
jpfariashahaha18:53
jpfariascmon18:53
jpfariasI'm beginner18:53
jpfariasno one will hire me18:53
jpfarias:-)18:53
*** markusleist has joined #zope3-dev18:53
ignas_jpfarias: yeah, and then you suddenly end up unable to show anything when people ask you for "the best code you ever wrote"18:55
ignas_which they do in interviews ;)18:55
jpfariasindeed18:55
mgedminbeginneritis is curable18:55
jpfariasof course18:55
jpfariaswith experience18:55
jpfarias:-)18:55
jpfariasbut if no one hires me18:56
ignas_mgedmin: can do it the surgical way ;)18:56
jpfariaswhere will I get experience from18:56
mgedminthe only place you can get experience: by doing stuff18:56
ignas_yeah, posting that stuff on the internet18:56
ignas_and letting experienced people ridicule it18:56
*** faassen has left #zope3-dev18:57
* benji wishes there were more jpfarias near him (looking for jobs). :)18:57
jpfariaslol18:57
ignas_benji: we saw him first!18:58
jpfariasfunny18:58
benjiLOL18:58
jpfariasthat what my partner tells me18:58
jpfariashe wishes there were more of me around18:58
jpfariaslol18:58
jpfariasso18:58
jpfariasthing is18:58
jpfariasI may not write best code18:58
jpfariasbut I can get stuff working18:58
jpfariasone way or the other18:58
jpfariashahaha18:59
jpfariasend up18:59
jpfariasmost of the stuff is just fine18:59
benjithere are many paths to enlightenment18:59
jpfariasand some are horrible18:59
jpfariasbut that works for us18:59
jpfariasI think it prolly cause I'm dedicated19:00
jpfariaswhile others fail and give up19:00
jpfariasI won't give up until I think it impossible19:00
jpfariasand then I succeed at some point19:01
jpfariaslol19:01
*** deo has joined #zope3-dev19:03
*** Aiste has quit IRC19:03
ignas_jpfarias: you are talking like you're 18 ;)19:04
jpfariasyeah, I noticed19:04
jpfariassorry guys19:04
jpfariasthat why I stopped19:05
jpfariaslol19:05
*** thruflo has quit IRC19:05
*** arroda has joined #zope3-dev19:06
jpfariashey19:10
jpfariashow do I run the unittests for generations folder?19:11
jpfariasguess I can't just run the .py file right?19:11
*** arroda has left #zope3-dev19:11
ignas_look at the schooltool code19:12
ignas_;)19:12
ignas_browse it around19:12
jpfariasI'm looking :-)19:13
jpfariasjust figured there a test-script.py in the bin folder19:13
jpfariaslol19:13
ignas_there is ./test.py in the top level directory of the repository19:16
ignas_that invokes the actual test runner19:16
ignas_but that's old school19:17
ignas_we are using buildout most of the time19:17
ignas_and buildout generated test scripts19:17
*** gimni has quit IRC19:17
*** jpcw2002 has left #zope3-dev19:17
ignas_jpfarias: i'd suggest using zopeproject19:19
ignas_it would add a test runner script for you19:20
ignas_so you'd only have to add the tests to proper locations and they'd get run19:20
jpfariasindeed19:21
jpfariasI'm using grok19:21
jpfariasso it ok19:21
*** MJ has quit IRC19:21
*** jodok has quit IRC19:26
jpfariashe ignas_19:33
jpfariasso I wrote the test19:33
jpfariasand another problem came up19:33
jpfariasit can't find the utility it has just registered19:33
ignas_:)19:33
ignas_you set the site to None19:34
ignas_yes?19:34
jpfariasno19:34
jpfariasoh19:34
jpfariasindeed19:34
jpfariasin the end of evolve19:34
jpfariaslol19:34
jpfariasneed to set it back to the app19:34
ignas_set it to the object in the test19:34
jpfarias right?19:34
ignas_before you get the utility19:34
jpfariasok19:34
mgedminwhee19:35
mgedminpastebin the test?19:36
mgedmincould be it is missing some fixture19:36
mgedminoh19:36
mgedminduh19:36
* mgedmin reads slowly19:36
jpfariashttp://paste.plone.org/1870019:37
* mgedmin suggests a setSite(None) at the end of that test19:40
jpfariasoh well19:40
jpfariastest fails on the catalog is None19:40
jpfariaswhich should be False19:40
*** norro_ has joined #zope3-dev19:40
ignas_1 - you have 2 setSite now19:41
ignas_the test already had one19:41
ignas_2 - i think the iteration through all the oids is failing19:42
ignas_i mean - your script can't find the application object19:42
jpfariasdidn't get the 219:42
ignas_in test_evolve14.py or somewhere around it19:42
ignas_there should be a test that sets up a fixture that uses something else (not findObjectsProviding)19:43
ignas_to find the objects to migrate19:43
jpfariasnope19:43
jpfariasthat the only test19:43
jpfarias:)19:43
ignas_i mean - in schooltool19:43
jpfariasah19:43
jpfariasok19:43
ignas_you might check my assumption first19:44
jpfariasso19:44
ignas_by raising in the code if it finds an object to evolve19:44
jpfariasu had a setUp and a tearDown in evolve1719:44
ignas_if you get an exception - bug is somewhere else ;)19:44
jpfariasI took that off19:44
ignas_oh19:44
ignas_well - you shouldn't have ;)19:44
ignas_at least not the placelessSetup bit19:45
*** quodt has quit IRC19:45
ignas_as it is the part that sets up Zope component registry for the test19:45
jpfariasman19:45
jpfariasnot sure if it coincidence19:45
jpfariasbut the next minute I posted in pastebin19:45
jpfariasI got a spam19:45
jpfariaslol19:45
ignas_lisppaste6: url19:47
lisppaste6To use the lisppaste bot, visit http://paste.lisp.org/new/zope3-dev and enter your paste.19:47
ignas_i like this one a bit better - it autoposts the url to the paste into the channel19:47
jpfariascool19:47
jpfariasno ideas why it wont find the catalog?19:49
ignas_well - i told you19:49
ignas_you haven't set up Zope component registry19:49
ignas_and it is the part that is responsible for all the adapter/utility look ups19:50
jpfariasoh really?19:50
jpfariashow do I do that?19:50
jpfariaslol19:50
ignas_look at test_evolve17.py in schooltool19:50
jpfariasok19:50
* mgedmin wants a $0.05 every time jpfarias says lol19:50
* mgedmin would be rich19:51
jpfarias:-)19:51
jpfariasis it the setup.createSiteManager(app) ?19:52
jpfariasoh19:53
jpfariasthe setUp19:53
jpfariasand tearDown19:53
ignas_congratulations ;)19:53
*** dunny has joined #zope3-dev19:56
jpfariasok19:57
jpfariasdifferent error now19:57
jpfarias:-)19:57
jpfariasit not indexing the name attribute19:57
jpfariasexpected ['paypal'] got []19:57
jpfariasmaybe it didn't index the object19:58
jpfariasat all19:58
ignas_you did all the setup parts19:58
ignas_the one with the key reference too19:58
jpfariassetup.placefulSetUp()19:58
ignas_you see - the rest of the set up19:59
jpfariasoh man19:59
jpfariasdo I need all of that?19:59
jpfariaslol19:59
ignas_especially the part that has a comment19:59
ignas_"this is code to set up the catalog for unit testing."19:59
mgedminlocal utilities make unit testing hard, which is one of the reasons why I don't like them19:59
*** d21 has joined #zope3-dev19:59
jpfariasoh well20:00
jpfariasthere we go20:00
jpfariascopying all ur setUp() :-)20:01
jpfariasnow it works20:01
jpfariasgod damnit20:01
jpfariastoo much trouble to write tests....20:01
jpfariashahaha20:01
ignas_you only do it once20:02
jpfariasnot surprisingly I survived without them20:02
ignas_and then it keeps your code working20:02
jpfariashopefully20:02
jpfarias:-)20:02
ignas_and this specific part is messed up ;)20:02
jpfariaswhat is messed up?20:02
jpfariasI just did something wrong?20:02
ignas_no20:02
jpfariasoh20:02
jpfariasgood20:02
ignas_the amount of fixture20:03
ignas_needed to unit test catalog20:03
jpfariasyeah20:03
jpfariaswth20:03
ignas_is huge20:03
jpfariasI would never figure that out myself20:03
*** natea|boston is now known as natea|duluth20:03
mgedminit's a design flaw in the catalog package, I'd say20:10
mgedminthat you have to do it manually20:10
mgedmininstead of calling setup.setUpCatalog()20:10
jpfariasthat would be nice indeed20:10
jpfarias:-)20:10
mgedminor, perhaps, zope.catalog.testing.setUpCatalog()20:10
jpfariasanother thing that I don't like in zope is its restart time20:12
*** dunny has quit IRC20:12
jpfariasdeveloping with that is a pain20:12
jpfariastakes about 20 secs here20:12
*** jukart has quit IRC20:13
mgedminouch20:14
mgedminyes, it's a pain20:14
mgedminbut if you do test-driven development, you'll have less need to restart zope20:14
* mgedmin winks20:14
jpfariaslol20:15
jpfariasbtw20:15
jpfarias<span tal:define="color python:src.has_pending_withdraw and 'orange' or src.is_active and 'black' or 'red'" tal:attributes="style string:color:${color}">20:15
jpfariasI'm trying to give a color to this span20:15
jpfariasis that best way of doing it?20:15
*** d2m has quit IRC20:15
jpfariasseems I'm doing it wrong20:15
jpfariaslol20:15
jpfariasarg, couldn't resist... said lol again20:16
mgedminI would do that in Python code20:17
mgedminand use tal:attributes="style string:color: ${view/color}"20:17
jpfariasok20:18
jpfariaslemme change that20:18
*** ignas_ has quit IRC20:24
*** ignas_ has joined #zope3-dev20:25
*** mcdonc has quit IRC20:33
*** jodok has joined #zope3-dev20:36
*** jukart has joined #zope3-dev20:36
*** tarek has quit IRC20:38
*** whit is now known as whit|out20:38
*** RaFromBRC has joined #zope3-dev20:42
*** romanofski has joined #zope3-dev20:46
*** thruflo_ has quit IRC20:51
*** dunny has joined #zope3-dev20:54
*** alecm has quit IRC20:56
*** tuxella has joined #zope3-dev20:59
*** tarek has joined #zope3-dev21:02
*** jodok has quit IRC21:03
*** jodok has joined #zope3-dev21:03
*** dunny has quit IRC21:04
*** stub has joined #zope3-dev21:06
*** tseaver has joined #zope3-dev21:17
*** tseaver is now known as TresEquis21:17
*** mkerrin has quit IRC21:18
*** tarek has quit IRC21:20
*** ignas_ has quit IRC21:20
*** harobed has quit IRC21:21
*** mcdonc has joined #zope3-dev21:21
*** quodt has joined #zope3-dev21:22
*** tuxella_ has joined #zope3-dev21:23
*** alecm has joined #zope3-dev21:28
*** mgedmin has quit IRC21:30
*** tuxella has quit IRC21:30
*** alecm has quit IRC21:31
*** tarek has joined #zope3-dev21:31
*** tuxella_ is now known as tuxella21:36
*** markusleist has quit IRC21:43
*** malthe has joined #zope3-dev21:47
*** tarek has quit IRC21:49
*** fcorrea has joined #zope3-dev21:51
*** jpfarias has quit IRC22:04
*** RaFromBRC is now known as RaFromBRC|brb22:04
*** jpfarias has joined #zope3-dev22:07
*** dunny has joined #zope3-dev22:18
*** natea|duluth has quit IRC22:22
*** rocky has quit IRC22:22
*** pelle__ has joined #zope3-dev22:25
*** gstratton has quit IRC22:26
*** pelle__ has quit IRC22:26
*** RaFromBRC|brb is now known as RaFromBRC22:35
*** hazmat has quit IRC22:36
*** ccomb has quit IRC22:38
*** hazmat has joined #zope3-dev22:50
*** jodok_ has joined #zope3-dev22:52
*** ccomb has joined #zope3-dev23:06
*** ccomb has left #zope3-dev23:06
*** ccomb has joined #zope3-dev23:06
*** jodok__ has joined #zope3-dev23:06
*** jodok has quit IRC23:11
*** fdrake has joined #zope3-dev23:12
fdrakeDoes anyone know who added me to the z3c.referercredentials project on PyPI?23:13
*** natea|boston has joined #zope3-dev23:14
*** natea|boston is now known as natea|duluth23:18
*** stub has quit IRC23:23
*** jodok_ has quit IRC23:23
* TresEquis wonders who Fred's Secret Santa is this year ;)23:26
*** sp0cksbeard has joined #zope3-dev23:26
* fdrake keeps his big stick hidden until the fool comes forth...23:27
*** pyqwer has quit IRC23:40
*** malthe has quit IRC23:43
*** whit|out is now known as whit23:44
*** fcorrea has left #zope3-dev23:48
*** jodok has joined #zope3-dev23:55
*** jodok_ has joined #zope3-dev23:56

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