IRC log of #zope3-dev for Wednesday, 2007-08-08

*** mrevoir_ has quit IRC00:00
*** norro has quit IRC00:14
*** schwendinger has joined #zope3-dev00:20
*** projekt01 has quit IRC00:22
*** rcrafton has quit IRC00:28
*** MrTopf has joined #zope3-dev00:34
*** redir has quit IRC00:37
*** greenman has quit IRC00:42
*** redir has joined #zope3-dev00:43
*** jodok_ has joined #zope3-dev00:45
*** whit has quit IRC00:45
*** whit has joined #zope3-dev00:46
*** jodok has quit IRC00:49
*** jodok has joined #zope3-dev00:49
*** rocky is now known as rocky|away00:52
*** redir has quit IRC01:00
*** marianom has left #zope3-dev01:00
*** jfroche has quit IRC01:05
*** jodok_ has quit IRC01:06
*** MJ has quit IRC01:17
*** pcardune has quit IRC01:18
*** ksmith99_ has joined #zope3-dev01:32
*** greenman has joined #zope3-dev01:37
*** schwendinger has quit IRC01:54
*** timte has quit IRC01:59
*** sm has joined #zope3-dev02:05
*** aelkner has joined #zope3-dev02:06
aelknerCan someone tell me what argument I have to pass to the pt_render function of a template to prevent it from turning my mixed-case tags into lower case?02:08
*** redir has joined #zope3-dev02:09
*** pcardune has joined #zope3-dev02:12
*** jodok has quit IRC02:13
*** MrTopf has quit IRC02:19
*** whit has quit IRC02:22
*** whit has joined #zope3-dev02:24
*** ksmith99_ has left #zope3-dev02:27
*** ksmith99 has joined #zope3-dev02:28
*** J1m has quit IRC02:31
*** RaFromBRC has quit IRC02:32
*** tjs has joined #zope3-dev02:37
tjsG'day02:37
instantfoogday mate02:38
tjsinstantfoo: hey02:38
tjsanyone familiar with how zope3 handles adding objects via the zmi?02:38
tjsI've got two folder classes I've developed, one is a subclass of zopes Folder, but handles storing zope objects as well as Storm objects (stored on SQL using canonicals storm orm)02:39
tjsthe other implements all of the various container interfaces, but is stored in sql02:39
tjsafter adding the various bits of zcml to get these addable via the ZMI, I can add the first type (zope folder that can store storm objects)02:40
tjsbut then if I try to add my storm folder inside there (which works just fine in all of my unit tests, both classes pass all of the zope folder tests + more)02:40
tjsI get a traceback, which is the ZODB obviously trying to pickle my storm object02:41
tjswhich is crack, because the folder its being added into knows how to handle storing storm objects02:41
tjshttp://rafb.net/p/S201E394.html02:41
tjs^^ traceback02:41
tjsI'm wondering why adding a new object to a folder doesn't just pass said object into said folder using the folders dict api02:42
tjswhy it tries to stuff it into the zodb02:42
tjsand how I can break that behavior02:42
*** redir has quit IRC02:43
*** projekt01 has joined #zope3-dev02:50
philiKONtjs: sounds like you're trying to store a *function* itself02:59
philiKONnot a storm object03:00
philiKONstoring an object in a folder is as simple as folder['name'] = obj03:00
philiKONthe question is what the folder does with that03:00
philiKONif it puts the obj into an OOBTree, it's stored persistently in the ZODB03:01
philiKONyou can, of course, write a folder that does something else, e.g. invoke storm03:01
*** mrevoir has joined #zope3-dev03:01
tjsphiliKON: I have a folder that is a ZOPE object (persistent) which knows how to store a reference to a storm object03:01
tjsas well as other zope objects03:01
tjsthis I can add via the ZMI fine03:02
tjswhen I then try to put a storm object in it (via the ZMI)03:02
tjsI get that error03:02
tjsin my unit tests I can do folder[name] = stormObj fine03:02
philiKONwhat does your __setitem__ look like?03:02
tjshttp://tjstebbing.googlepages.com/base.tgz <-- the whole thing03:03
tjsI can rafb the __setitem__03:03
tjssec..03:03
tjshttp://rafb.net/p/jAyl7q79.html03:04
*** b52laptop has quit IRC03:05
philiKONtjs: so what's self.xrefChildren?03:08
tjsits a descriptor that turns an object into a two tuple 'reference'03:08
philiKONhow?03:09
philiKONi mean03:09
philiKONdoes it store anything on the object?03:09
tjs('STORM', ('ClassName', 'PriKeyAttr', 'PriKeyValue')) for a storm object03:09
philiKONuh huh03:09
tjsfor a zope object its ('ZODB', 'uid')03:10
philiKONuid?03:10
tjson the zope object that is stored in "crossref__%" (name of the attribute descriptor was assigned to,)03:11
tjsoid03:11
philiKONaha03:11
philiKONso, it does store attributes on the object03:11
tjssorry, I used to be a cmf junkie ;)03:11
philiKONwhich then get persisted03:11
*** mrevoir has quit IRC03:11
tjsyes03:11
philiKONhmmm03:11
tjsbut they are just simple types03:11
philiKONif you're sure :)03:11
tjslists of tuples of strings and ints03:11
philiKONanyway, i would pdb into this03:11
philiKONsee which function it's trying to pickle03:12
tjsok, one mo :)03:12
philiKONi'm going to bed :)03:12
tjsn ight :)03:12
tjsthanks03:12
philiKONbtw, some comments:03:12
philiKON- the "zmi" is dead...03:12
philiKON  just to clear that up in case you didn't know03:13
philiKON  just see it as an example application for zop e303:13
philiKON  nobody reallye xpects you to build anything useful with it03:13
philiKON  (and my book is a bad example here which will be changed in an upcoming edition)03:13
philiKON- "Folder" is the ZMI incarnation of what we more generally like to call container03:14
tjsah03:14
philiKON  i wouldn't inherit from zope.app.folder.folder.Folder03:14
tjsok03:14
philiKON   take zope.app.container.btree.BTreeContainer, for example]03:14
* tjs nods03:15
philiKON- this is a matter of taste, but i prefer super() instead of calling the base class :)03:15
philiKON  (though i admit that the spelling of super() is a tad awkward... stil prefer it, however)03:16
* philiKON goest o bed03:16
*** lmiller has joined #zope3-dev03:17
*** ksmith99 has left #zope3-dev03:24
*** edgordon has quit IRC03:39
tjszope wouldnt be trying to pickle my descriptors would it ?03:50
tjsthat would just be silly..03:50
*** whit has quit IRC03:54
*** whit has joined #zope3-dev03:56
*** whit has quit IRC04:20
*** whit has joined #zope3-dev04:22
*** ignas has quit IRC04:23
*** huajie has joined #zope3-dev04:50
*** stub has joined #zope3-dev05:20
*** aelkner has left #zope3-dev05:26
*** greenman has quit IRC05:43
*** alecm has quit IRC05:45
*** huajie has quit IRC05:52
*** whit has quit IRC05:52
*** whit has joined #zope3-dev05:54
*** edgordon has joined #zope3-dev05:55
*** edgordon_ has joined #zope3-dev05:57
*** natea_ has joined #zope3-dev06:01
*** edgordon has quit IRC06:14
*** whit has quit IRC06:14
*** whit has joined #zope3-dev06:16
*** encompass has left #zope3-dev06:26
*** philiKON_ has joined #zope3-dev06:34
*** philiKON has quit IRC06:41
*** chacha_chaudhry has joined #zope3-dev06:59
*** niemeyer has quit IRC07:03
*** sm has quit IRC07:35
*** whit has quit IRC07:36
*** whit has joined #zope3-dev07:38
*** natea_ has quit IRC07:38
*** baijum has joined #zope3-dev07:39
*** tarek has quit IRC07:45
*** natea_ has joined #zope3-dev07:47
*** tjs has quit IRC07:57
*** whit has quit IRC08:00
*** deo has quit IRC08:01
*** whit has joined #zope3-dev08:01
*** cursor has joined #zope3-dev08:18
*** stub has quit IRC08:19
*** kleist has joined #zope3-dev08:33
*** sorin has joined #zope3-dev08:45
*** sorin is now known as sorindregan08:46
*** yvl has joined #zope3-dev09:28
*** romanofski has joined #zope3-dev09:29
*** natea_ has quit IRC09:30
*** whit_ has joined #zope3-dev09:31
*** whit has quit IRC09:31
romanofskimoin :)09:37
*** whit_ has quit IRC09:54
*** whit_ has joined #zope3-dev09:57
*** timte has joined #zope3-dev10:03
*** markusleist has quit IRC10:08
*** cursor has quit IRC10:21
*** jodok has joined #zope3-dev10:32
zagyuuuhm10:34
zagy<meta:redefinePermission behaves strange10:34
*** pcardune has quit IRC10:41
zagyit doesn't seem to redefine globally but only "below" the redefining zcml ...10:42
wiggyto override globally you should probably use overrides.zcml10:44
wiggysince you're overriding10:44
zagyhmmm10:44
zagygood point10:44
zagyi wonder anyway why it behaves like it does10:44
wiggyI wonder why it exists at all :)10:45
zagyoh well, you can define very specialized permissions and map those to more general ones10:45
zagythis makes the roles definition more readable (at least here in my case)10:46
zagyno overrides doesn't make sense10:47
zagysince redefinePermission maps *subsequent* permission references10:47
zagyanyway, me tries something else :)10:49
*** stub has joined #zope3-dev10:50
*** naro has joined #zope3-dev10:53
*** cursor has joined #zope3-dev11:04
*** ktwilight has joined #zope3-dev11:11
*** whit_ has quit IRC11:14
sorindreganis there a place where I can configure the max request size in z3? My file upload fails at 100 mb11:14
sorindreganwould this be connected to the zeo client cache size? It's set at 100mb as well11:14
*** whit_ has joined #zope3-dev11:16
*** naro_ has joined #zope3-dev11:18
*** ktwilight_ has quit IRC11:19
*** ferrafox has joined #zope3-dev11:23
*** naro has quit IRC11:26
*** MJ has joined #zope3-dev11:30
*** naro_ is now known as naro11:35
*** whit_ has quit IRC11:39
*** whit_ has joined #zope3-dev11:42
*** tarek has joined #zope3-dev11:48
*** junkafarian has joined #zope3-dev12:01
*** richardkan has joined #zope3-dev12:08
*** greenman has joined #zope3-dev12:11
*** goschtl has joined #zope3-dev12:16
*** zagy has quit IRC12:21
*** b52laptop has joined #zope3-dev12:29
*** zagy has joined #zope3-dev12:30
*** whit_ has quit IRC12:47
*** whit_ has joined #zope3-dev12:49
goschtlhi i have a custom AuthenticatorPlugin, this works fine so far. Is it possible to add some Role Information in the PrincipalInfo. Something like: return PrincipalInfo(self.prefix+login, login, login, login, ROLE)12:54
*** mkerrin has joined #zope3-dev12:58
*** mgedmin has joined #zope3-dev13:08
*** Ariel_Calzada has quit IRC13:13
*** whit_ has quit IRC13:20
*** whit_ has joined #zope3-dev13:22
*** Ariel_Calzada has joined #zope3-dev13:31
*** tarek has quit IRC13:41
*** tarek has joined #zope3-dev13:43
*** MJ is now known as MJ|lunch13:43
*** romanofs1i has joined #zope3-dev13:48
*** zagy_ has joined #zope3-dev13:54
baijumromanofski, what is Dependencies "ok" means here: http://wiki.zope.org/zope3/EggificationOfZopePackages13:59
*** romanofski has quit IRC14:05
baijumI guess Dependencies "ok" means there is no direct dependency on zope.app packages ?14:05
*** zagy has quit IRC14:08
romanofs1ibaijum: yes - you're right14:13
romanofs1iok means no direct dependency on zope.app14:13
*** romanofs1i is now known as romanofski14:13
*** yvl has quit IRC14:13
*** MJ|lunch is now known as MJ14:19
*** benji has quit IRC14:24
*** zagy_ has quit IRC14:25
*** zagy has joined #zope3-dev14:25
*** stub has quit IRC14:27
*** Newfie2007 has joined #zope3-dev14:28
baijumromanofski, ok14:34
*** whit_ has quit IRC14:41
*** whit_ has joined #zope3-dev14:42
*** chacha_chaudhry has quit IRC14:44
*** greenman has quit IRC14:47
*** MJ has quit IRC14:55
*** zagy_ has joined #zope3-dev15:06
*** zagy has quit IRC15:06
*** afd has joined #zope3-dev15:09
*** romanofs1i has joined #zope3-dev15:11
*** vlado has joined #zope3-dev15:14
*** ignas has joined #zope3-dev15:16
*** whit__ has joined #zope3-dev15:19
*** whit_ has quit IRC15:19
*** stub has joined #zope3-dev15:20
*** benji has joined #zope3-dev15:20
*** stub has quit IRC15:21
*** stub has joined #zope3-dev15:21
*** ignas has quit IRC15:22
*** rcrafton has joined #zope3-dev15:24
*** J1m has joined #zope3-dev15:25
*** niemeyer has joined #zope3-dev15:26
*** romanofski has quit IRC15:29
*** mrevoir has joined #zope3-dev15:36
*** b52laptop has quit IRC15:42
*** b52laptop has joined #zope3-dev15:43
*** markusleist has joined #zope3-dev15:49
*** ferrafox_ has joined #zope3-dev15:50
*** ferrafox has quit IRC15:50
*** rocky|away is now known as rocky15:51
*** philiKON_ has left #zope3-dev15:52
*** dunny has joined #zope3-dev15:55
*** Ariel_Calzada has quit IRC15:57
*** cursor has quit IRC16:07
*** mrevoir has quit IRC16:11
*** elro has joined #zope3-dev16:14
elroIs there anything to generate code from a schema? (I'm using a piece of alchemist to autogenerate z3 schema from sqlalchemy, but want to hand tweak the result)16:19
*** ferrafox_ has quit IRC16:19
*** whit__ has quit IRC16:31
*** whit__ has joined #zope3-dev16:32
*** ferrafox_ has joined #zope3-dev16:35
*** fcorrea has joined #zope3-dev16:47
ccombHello,  how can I let every single instance of an object react to an event ?16:47
fcorreaccomb: a event must be sent in order to react to it. Then you need a subscriber for the reaction16:49
ccombinstead of having a general subscriber function, I would like this function (or even method) to be triggered for every listening object instance16:49
ccombI'm sending an event from an object16:49
ccombthis is an 'update' event16:49
ccombI want every other concerned object to self.update() also16:50
*** baijum has quit IRC16:50
*** whit has joined #zope3-dev16:51
*** whit has quit IRC16:53
ccombshould I   provideHandler(self.method_to_launch)   in the class__init__ ?16:53
*** torkel_ has joined #zope3-dev16:54
fcorreaccomb: it would be a good try16:56
ccomb(or maybe do this registration in a subscriber to IObjectCreatedEvent.)16:57
fcorreaI just don't see how the object will react to it. How CA will find then component that subscribed for that16:57
*** J1m_ has joined #zope3-dev17:02
*** pcardune has joined #zope3-dev17:03
ccombmmh.. not easy.  Since the subscriber must be an adapter, I would need to turn each instance method to an adapter17:04
ccombnonsense17:04
fcorreayep. Maybe you could wire some more python on it with some python descriptor tied to a event subscriber and then take control from that17:07
* fcorrea not sure if python descriptors can do that17:07
ccombthat does not solve the problem of registering every instance as a subscriber17:12
*** lucielejard has joined #zope3-dev17:12
afdccomb: why not have a signle event handler that looks up the objects and does something with them?17:12
ccombthat's just what I'm going to do, but I'm thinking of a more complex method :)17:13
ccombI could have some kind of adapter factory,  each class __init__ would create and register its own subscriber adapter, that would be tied to the instance method17:14
afdccomb: the other thing I can think of, which I'm not even sure it would work would be to register your objects, as they are created (I presume these are not persistent objects), with the CA as event handlers17:14
ccombregister the object themselves as event handler ?17:14
ccombwhy not17:15
afdccomb: subscriber to your event17:15
ccombyes subscriber17:15
*** whit__ has quit IRC17:17
ccombit would be nice to be able to add a decorator to any method, to turn it into an event subscriber17:17
*** jukart has joined #zope3-dev17:17
*** Ariel_Calzada has joined #zope3-dev17:19
*** whit__ has joined #zope3-dev17:19
*** stub has quit IRC17:24
*** edgordon_ has quit IRC17:24
ccombHEY17:25
*** nerdalert has joined #zope3-dev17:25
ccombfcorrea afd : that's crazy, but that works!17:25
ccombJust two lines to add17:25
afdccomb: :)17:26
ccombI added a __call__ method to my class, and provideHandler(self, (IMyObject, IMyEvent))  at the end of the __init__17:27
ccombwhen I notify, the __call__ is called for all my instances17:27
ccombzope3 is sooo great17:27
fcorreaccomb: Now try notifying 5000000 instances of those objects ;)17:32
ccomb;)17:32
ccombno, I won't have more than a few ones17:33
*** sorindregan has quit IRC17:33
fcorreajust kidding. That could drive your project crazy with no syncronized threads since all the objects will react at the same time. Do you know if your objects reacts in some kind of order to the event?17:35
*** J1m_ has quit IRC17:35
ccombThere should be an order, I have a first object that feetch data from a sql database, then some other objects that fetch data from the previous object, and a few other chained objects17:38
*** whit has joined #zope3-dev17:38
fcorreacool17:38
ccomban object should update() only if it receive an event from an object chained to it17:40
ccombActually this event pattern could be used for a C-A based process workflow engine17:41
*** ferrafox_ is now known as ferrafox17:43
*** whit has quit IRC17:50
*** sm has joined #zope3-dev17:51
*** whit__ is now known as wbuntu17:55
*** rcrafton has quit IRC17:57
*** rcrafton has joined #zope3-dev18:13
*** wbuntu has quit IRC18:24
*** wbuntu has joined #zope3-dev18:26
*** mrevoir has joined #zope3-dev18:29
*** vlado has quit IRC18:32
*** markusleist has quit IRC18:47
*** jsadjohnson has quit IRC18:47
*** projekt01 has left #zope3-dev18:51
*** philiKON has joined #zope3-dev18:57
*** jukart has quit IRC18:59
*** goschtl has quit IRC19:01
*** alecm has joined #zope3-dev19:08
*** wbuntu has quit IRC19:13
*** wbuntu has joined #zope3-dev19:16
*** norro has joined #zope3-dev19:18
*** nathany has joined #zope3-dev19:18
*** philiKON has quit IRC19:32
*** philiKON has joined #zope3-dev19:34
*** RaFromBRC has joined #zope3-dev19:37
*** dunny has quit IRC19:41
*** romanofs1i has quit IRC19:43
*** ignas has joined #zope3-dev19:47
*** ksmith99 has joined #zope3-dev19:48
*** kleist has quit IRC19:53
*** wbuntu has quit IRC19:58
*** wbuntu has joined #zope3-dev20:00
*** jodok has quit IRC20:10
*** salfield has joined #zope3-dev20:13
*** redir has joined #zope3-dev20:18
*** pbugni has joined #zope3-dev20:25
*** richardkan has quit IRC20:33
*** J1m has quit IRC20:51
*** naro has quit IRC20:53
*** J1m has joined #zope3-dev20:53
*** marianom has joined #zope3-dev20:58
*** torkel_ has quit IRC21:00
*** torkel_ has joined #zope3-dev21:00
*** bigkev has joined #zope3-dev21:06
*** wbuntu has quit IRC21:07
*** wbuntu has joined #zope3-dev21:10
*** mkerrin has quit IRC21:11
*** b52laptop has quit IRC21:16
*** bigkevmcd has quit IRC21:17
*** torkel_ has quit IRC21:19
*** torkel_ has joined #zope3-dev21:19
*** ferrafox has quit IRC21:22
*** romanofski has joined #zope3-dev21:27
*** torkel_ has quit IRC21:27
*** torkel_ has joined #zope3-dev21:27
*** alecm has quit IRC21:28
*** alecm has joined #zope3-dev21:28
*** junkafarian has quit IRC21:37
*** torkel_ has quit IRC21:40
*** torkel_ has joined #zope3-dev21:40
*** nathany has quit IRC21:42
*** pbugni has quit IRC21:46
*** rocky has quit IRC21:47
*** mgedmin has quit IRC21:47
*** wbuntu has quit IRC21:48
*** wbuntu has joined #zope3-dev21:50
*** tarek has quit IRC21:51
*** tarek has joined #zope3-dev21:51
*** torkel_ has quit IRC21:57
*** torkel_ has joined #zope3-dev21:57
*** rocky has joined #zope3-dev21:57
*** jsadjohnson has joined #zope3-dev21:57
*** lucielejard has quit IRC21:58
*** Newfie2007 has quit IRC21:59
*** J1m_ has joined #zope3-dev22:00
*** Lumiere has quit IRC22:02
*** torkel_ has quit IRC22:05
*** torkel_ has joined #zope3-dev22:05
*** torkel_ has quit IRC22:14
*** torkel_ has joined #zope3-dev22:14
*** torkel_ has quit IRC22:20
*** torkel_ has joined #zope3-dev22:20
*** b52laptop has joined #zope3-dev22:22
*** J1m_ has quit IRC22:22
*** sm is now known as sm-afk22:25
*** torkel_ has quit IRC22:26
*** torkel_ has joined #zope3-dev22:26
*** Jell-O-Fishi has joined #zope3-dev22:26
*** J1m_ has joined #zope3-dev22:33
*** jodok has joined #zope3-dev22:34
*** pbugni has joined #zope3-dev22:35
*** elro has quit IRC22:37
*** torkel_ has quit IRC22:45
*** torkel_ has joined #zope3-dev22:45
lisppaste6instantfoo pasted "getAdapters" at http://paste.lisp.org/display/4585022:53
instantfoohi, i'm trying to retrieve all adapters that implements an interface and adapts a certain interface..22:53
*** torkel_ has quit IRC22:54
*** torkel_ has joined #zope3-dev22:54
instantfootrying getAdapters in debugzope without success :(22:54
alecminstantfoo: getAdapters requires a tuple of objects to adapt and an interface that the adapters provide, it returns a sequence of (name, adapted-object) pairs22:55
alecmit's only useful for named adapters though, as it will only find one adapter per name (e.g. the most "specific" one for the given object(s))22:56
instantfooso if I want to get something like [<class '__main__.Foo'>, <class '__main__.FooBar'>], how would i go about?22:57
*** wbuntu has quit IRC22:57
alecminstantfoo: Then you want to use the APIs from zope.app.apidoc22:58
afdinstantfoo: I usually go to the zope.app.apidoc package to see how zope's apidoc does it, for this kind of stuff22:59
alecminstantfoo: zope.app.apidoc.component.getRequiredAdapters and getProvidedAdapters22:59
*** wbuntu has joined #zope3-dev22:59
instantfoocheers, I'll look into them22:59
*** MJ has joined #zope3-dev23:00
*** torkel_ has quit IRC23:00
*** greenman has joined #zope3-dev23:00
*** torkel_ has joined #zope3-dev23:00
alecmgood luck, for your usecase you will probably need to use both and intersect the results.  Not nearly as efficient as using getAdapters would be I think, so you may want to rethink your architecture to make use of named adapters.23:00
instantfooactually, in my real use case my adapters are named :)23:01
instantfoomaybe i should just name them in my simple interpreter test and play around with it23:02
*** torkel_ has quit IRC23:09
*** torkel_ has joined #zope3-dev23:10
*** ignas has quit IRC23:11
instantfoohmm23:11
instantfooif i name the adapters.. provideAdapter(factory=Foo, name=u'afoo')23:14
instantfooshouldn't getAdapters work then?23:14
instantfoowait..23:15
instantfoogreat, now the pastebin went down :)23:16
*** torkel_ has quit IRC23:17
*** torkel_ has joined #zope3-dev23:17
instantfoohttp://papernapkin.org/pastebin/view/123823:18
instantfooscroll down :)23:19
instantfooi guess what i want to do in my real use case is roughly..23:23
*** dunny has joined #zope3-dev23:23
instantfoofor a in [<..Foo>, <..Bar>]:   a(c).someFunc()23:24
instantfoobut dynamically get that adapter list, obviously23:25
*** torkel_ has quit IRC23:30
*** povbot` has joined #zope3-dev23:32
*** mrevoir has quit IRC23:40
*** torkel_ has quit IRC23:47
*** torkel_ has joined #zope3-dev23:47
*** jukart has joined #zope3-dev23:47
*** wbuntu has quit IRC23:48
*** pcardune has quit IRC23:48
*** povbot has quit IRC23:50
*** wbuntu has joined #zope3-dev23:50
*** torkel_ has quit IRC23:55
*** torkel_ has joined #zope3-dev23:55

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