*** mrevoir_ has quit IRC | 00:00 | |
*** norro has quit IRC | 00:14 | |
*** schwendinger has joined #zope3-dev | 00:20 | |
*** projekt01 has quit IRC | 00:22 | |
*** rcrafton has quit IRC | 00:28 | |
*** MrTopf has joined #zope3-dev | 00:34 | |
*** redir has quit IRC | 00:37 | |
*** greenman has quit IRC | 00:42 | |
*** redir has joined #zope3-dev | 00:43 | |
*** jodok_ has joined #zope3-dev | 00:45 | |
*** whit has quit IRC | 00:45 | |
*** whit has joined #zope3-dev | 00:46 | |
*** jodok has quit IRC | 00:49 | |
*** jodok has joined #zope3-dev | 00:49 | |
*** rocky is now known as rocky|away | 00:52 | |
*** redir has quit IRC | 01:00 | |
*** marianom has left #zope3-dev | 01:00 | |
*** jfroche has quit IRC | 01:05 | |
*** jodok_ has quit IRC | 01:06 | |
*** MJ has quit IRC | 01:17 | |
*** pcardune has quit IRC | 01:18 | |
*** ksmith99_ has joined #zope3-dev | 01:32 | |
*** greenman has joined #zope3-dev | 01:37 | |
*** schwendinger has quit IRC | 01:54 | |
*** timte has quit IRC | 01:59 | |
*** sm has joined #zope3-dev | 02:05 | |
*** aelkner has joined #zope3-dev | 02:06 | |
aelkner | Can 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-dev | 02:09 | |
*** pcardune has joined #zope3-dev | 02:12 | |
*** jodok has quit IRC | 02:13 | |
*** MrTopf has quit IRC | 02:19 | |
*** whit has quit IRC | 02:22 | |
*** whit has joined #zope3-dev | 02:24 | |
*** ksmith99_ has left #zope3-dev | 02:27 | |
*** ksmith99 has joined #zope3-dev | 02:28 | |
*** J1m has quit IRC | 02:31 | |
*** RaFromBRC has quit IRC | 02:32 | |
*** tjs has joined #zope3-dev | 02:37 | |
tjs | G'day | 02:37 |
instantfoo | gday mate | 02:38 |
tjs | instantfoo: hey | 02:38 |
tjs | anyone familiar with how zope3 handles adding objects via the zmi? | 02:38 |
tjs | I'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 |
tjs | the other implements all of the various container interfaces, but is stored in sql | 02:39 |
tjs | after 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 |
tjs | but 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 |
tjs | I get a traceback, which is the ZODB obviously trying to pickle my storm object | 02:41 |
tjs | which is crack, because the folder its being added into knows how to handle storing storm objects | 02:41 |
tjs | http://rafb.net/p/S201E394.html | 02:41 |
tjs | ^^ traceback | 02:41 |
tjs | I'm wondering why adding a new object to a folder doesn't just pass said object into said folder using the folders dict api | 02:42 |
tjs | why it tries to stuff it into the zodb | 02:42 |
tjs | and how I can break that behavior | 02:42 |
*** redir has quit IRC | 02:43 | |
*** projekt01 has joined #zope3-dev | 02:50 | |
philiKON | tjs: sounds like you're trying to store a *function* itself | 02:59 |
philiKON | not a storm object | 03:00 |
philiKON | storing an object in a folder is as simple as folder['name'] = obj | 03:00 |
philiKON | the question is what the folder does with that | 03:00 |
philiKON | if it puts the obj into an OOBTree, it's stored persistently in the ZODB | 03:01 |
philiKON | you can, of course, write a folder that does something else, e.g. invoke storm | 03:01 |
*** mrevoir has joined #zope3-dev | 03:01 | |
tjs | philiKON: I have a folder that is a ZOPE object (persistent) which knows how to store a reference to a storm object | 03:01 |
tjs | as well as other zope objects | 03:01 |
tjs | this I can add via the ZMI fine | 03:02 |
tjs | when I then try to put a storm object in it (via the ZMI) | 03:02 |
tjs | I get that error | 03:02 |
tjs | in my unit tests I can do folder[name] = stormObj fine | 03:02 |
philiKON | what does your __setitem__ look like? | 03:02 |
tjs | http://tjstebbing.googlepages.com/base.tgz <-- the whole thing | 03:03 |
tjs | I can rafb the __setitem__ | 03:03 |
tjs | sec.. | 03:03 |
tjs | http://rafb.net/p/jAyl7q79.html | 03:04 |
*** b52laptop has quit IRC | 03:05 | |
philiKON | tjs: so what's self.xrefChildren? | 03:08 |
tjs | its a descriptor that turns an object into a two tuple 'reference' | 03:08 |
philiKON | how? | 03:09 |
philiKON | i mean | 03:09 |
philiKON | does it store anything on the object? | 03:09 |
tjs | ('STORM', ('ClassName', 'PriKeyAttr', 'PriKeyValue')) for a storm object | 03:09 |
philiKON | uh huh | 03:09 |
tjs | for a zope object its ('ZODB', 'uid') | 03:10 |
philiKON | uid? | 03:10 |
tjs | on the zope object that is stored in "crossref__%" (name of the attribute descriptor was assigned to,) | 03:11 |
tjs | oid | 03:11 |
philiKON | aha | 03:11 |
philiKON | so, it does store attributes on the object | 03:11 |
tjs | sorry, I used to be a cmf junkie ;) | 03:11 |
philiKON | which then get persisted | 03:11 |
*** mrevoir has quit IRC | 03:11 | |
tjs | yes | 03:11 |
philiKON | hmmm | 03:11 |
tjs | but they are just simple types | 03:11 |
philiKON | if you're sure :) | 03:11 |
tjs | lists of tuples of strings and ints | 03:11 |
philiKON | anyway, i would pdb into this | 03:11 |
philiKON | see which function it's trying to pickle | 03:12 |
tjs | ok, one mo :) | 03:12 |
philiKON | i'm going to bed :) | 03:12 |
tjs | n ight :) | 03:12 |
tjs | thanks | 03:12 |
philiKON | btw, some comments: | 03:12 |
philiKON | - the "zmi" is dead... | 03:12 |
philiKON | just to clear that up in case you didn't know | 03:13 |
philiKON | just see it as an example application for zop e3 | 03:13 |
philiKON | nobody reallye xpects you to build anything useful with it | 03: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 container | 03:14 |
tjs | ah | 03:14 |
philiKON | i wouldn't inherit from zope.app.folder.folder.Folder | 03:14 |
tjs | ok | 03:14 |
philiKON | take zope.app.container.btree.BTreeContainer, for example] | 03:14 |
* tjs nods | 03: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 bed | 03:16 | |
*** lmiller has joined #zope3-dev | 03:17 | |
*** ksmith99 has left #zope3-dev | 03:24 | |
*** edgordon has quit IRC | 03:39 | |
tjs | zope wouldnt be trying to pickle my descriptors would it ? | 03:50 |
tjs | that would just be silly.. | 03:50 |
*** whit has quit IRC | 03:54 | |
*** whit has joined #zope3-dev | 03:56 | |
*** whit has quit IRC | 04:20 | |
*** whit has joined #zope3-dev | 04:22 | |
*** ignas has quit IRC | 04:23 | |
*** huajie has joined #zope3-dev | 04:50 | |
*** stub has joined #zope3-dev | 05:20 | |
*** aelkner has left #zope3-dev | 05:26 | |
*** greenman has quit IRC | 05:43 | |
*** alecm has quit IRC | 05:45 | |
*** huajie has quit IRC | 05:52 | |
*** whit has quit IRC | 05:52 | |
*** whit has joined #zope3-dev | 05:54 | |
*** edgordon has joined #zope3-dev | 05:55 | |
*** edgordon_ has joined #zope3-dev | 05:57 | |
*** natea_ has joined #zope3-dev | 06:01 | |
*** edgordon has quit IRC | 06:14 | |
*** whit has quit IRC | 06:14 | |
*** whit has joined #zope3-dev | 06:16 | |
*** encompass has left #zope3-dev | 06:26 | |
*** philiKON_ has joined #zope3-dev | 06:34 | |
*** philiKON has quit IRC | 06:41 | |
*** chacha_chaudhry has joined #zope3-dev | 06:59 | |
*** niemeyer has quit IRC | 07:03 | |
*** sm has quit IRC | 07:35 | |
*** whit has quit IRC | 07:36 | |
*** whit has joined #zope3-dev | 07:38 | |
*** natea_ has quit IRC | 07:38 | |
*** baijum has joined #zope3-dev | 07:39 | |
*** tarek has quit IRC | 07:45 | |
*** natea_ has joined #zope3-dev | 07:47 | |
*** tjs has quit IRC | 07:57 | |
*** whit has quit IRC | 08:00 | |
*** deo has quit IRC | 08:01 | |
*** whit has joined #zope3-dev | 08:01 | |
*** cursor has joined #zope3-dev | 08:18 | |
*** stub has quit IRC | 08:19 | |
*** kleist has joined #zope3-dev | 08:33 | |
*** sorin has joined #zope3-dev | 08:45 | |
*** sorin is now known as sorindregan | 08:46 | |
*** yvl has joined #zope3-dev | 09:28 | |
*** romanofski has joined #zope3-dev | 09:29 | |
*** natea_ has quit IRC | 09:30 | |
*** whit_ has joined #zope3-dev | 09:31 | |
*** whit has quit IRC | 09:31 | |
romanofski | moin :) | 09:37 |
*** whit_ has quit IRC | 09:54 | |
*** whit_ has joined #zope3-dev | 09:57 | |
*** timte has joined #zope3-dev | 10:03 | |
*** markusleist has quit IRC | 10:08 | |
*** cursor has quit IRC | 10:21 | |
*** jodok has joined #zope3-dev | 10:32 | |
zagy | uuuhm | 10:34 |
zagy | <meta:redefinePermission behaves strange | 10:34 |
*** pcardune has quit IRC | 10:41 | |
zagy | it doesn't seem to redefine globally but only "below" the redefining zcml ... | 10:42 |
wiggy | to override globally you should probably use overrides.zcml | 10:44 |
wiggy | since you're overriding | 10:44 |
zagy | hmmm | 10:44 |
zagy | good point | 10:44 |
zagy | i wonder anyway why it behaves like it does | 10:44 |
wiggy | I wonder why it exists at all :) | 10:45 |
zagy | oh well, you can define very specialized permissions and map those to more general ones | 10:45 |
zagy | this makes the roles definition more readable (at least here in my case) | 10:46 |
zagy | no overrides doesn't make sense | 10:47 |
zagy | since redefinePermission maps *subsequent* permission references | 10:47 |
zagy | anyway, me tries something else :) | 10:49 |
*** stub has joined #zope3-dev | 10:50 | |
*** naro has joined #zope3-dev | 10:53 | |
*** cursor has joined #zope3-dev | 11:04 | |
*** ktwilight has joined #zope3-dev | 11:11 | |
*** whit_ has quit IRC | 11:14 | |
sorindregan | is there a place where I can configure the max request size in z3? My file upload fails at 100 mb | 11:14 |
sorindregan | would this be connected to the zeo client cache size? It's set at 100mb as well | 11:14 |
*** whit_ has joined #zope3-dev | 11:16 | |
*** naro_ has joined #zope3-dev | 11:18 | |
*** ktwilight_ has quit IRC | 11:19 | |
*** ferrafox has joined #zope3-dev | 11:23 | |
*** naro has quit IRC | 11:26 | |
*** MJ has joined #zope3-dev | 11:30 | |
*** naro_ is now known as naro | 11:35 | |
*** whit_ has quit IRC | 11:39 | |
*** whit_ has joined #zope3-dev | 11:42 | |
*** tarek has joined #zope3-dev | 11:48 | |
*** junkafarian has joined #zope3-dev | 12:01 | |
*** richardkan has joined #zope3-dev | 12:08 | |
*** greenman has joined #zope3-dev | 12:11 | |
*** goschtl has joined #zope3-dev | 12:16 | |
*** zagy has quit IRC | 12:21 | |
*** b52laptop has joined #zope3-dev | 12:29 | |
*** zagy has joined #zope3-dev | 12:30 | |
*** whit_ has quit IRC | 12:47 | |
*** whit_ has joined #zope3-dev | 12:49 | |
goschtl | hi 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-dev | 12:58 | |
*** mgedmin has joined #zope3-dev | 13:08 | |
*** Ariel_Calzada has quit IRC | 13:13 | |
*** whit_ has quit IRC | 13:20 | |
*** whit_ has joined #zope3-dev | 13:22 | |
*** Ariel_Calzada has joined #zope3-dev | 13:31 | |
*** tarek has quit IRC | 13:41 | |
*** tarek has joined #zope3-dev | 13:43 | |
*** MJ is now known as MJ|lunch | 13:43 | |
*** romanofs1i has joined #zope3-dev | 13:48 | |
*** zagy_ has joined #zope3-dev | 13:54 | |
baijum | romanofski, what is Dependencies "ok" means here: http://wiki.zope.org/zope3/EggificationOfZopePackages | 13:59 |
*** romanofski has quit IRC | 14:05 | |
baijum | I guess Dependencies "ok" means there is no direct dependency on zope.app packages ? | 14:05 |
*** zagy has quit IRC | 14:08 | |
romanofs1i | baijum: yes - you're right | 14:13 |
romanofs1i | ok means no direct dependency on zope.app | 14:13 |
*** romanofs1i is now known as romanofski | 14:13 | |
*** yvl has quit IRC | 14:13 | |
*** MJ|lunch is now known as MJ | 14:19 | |
*** benji has quit IRC | 14:24 | |
*** zagy_ has quit IRC | 14:25 | |
*** zagy has joined #zope3-dev | 14:25 | |
*** stub has quit IRC | 14:27 | |
*** Newfie2007 has joined #zope3-dev | 14:28 | |
baijum | romanofski, ok | 14:34 |
*** whit_ has quit IRC | 14:41 | |
*** whit_ has joined #zope3-dev | 14:42 | |
*** chacha_chaudhry has quit IRC | 14:44 | |
*** greenman has quit IRC | 14:47 | |
*** MJ has quit IRC | 14:55 | |
*** zagy_ has joined #zope3-dev | 15:06 | |
*** zagy has quit IRC | 15:06 | |
*** afd has joined #zope3-dev | 15:09 | |
*** romanofs1i has joined #zope3-dev | 15:11 | |
*** vlado has joined #zope3-dev | 15:14 | |
*** ignas has joined #zope3-dev | 15:16 | |
*** whit__ has joined #zope3-dev | 15:19 | |
*** whit_ has quit IRC | 15:19 | |
*** stub has joined #zope3-dev | 15:20 | |
*** benji has joined #zope3-dev | 15:20 | |
*** stub has quit IRC | 15:21 | |
*** stub has joined #zope3-dev | 15:21 | |
*** ignas has quit IRC | 15:22 | |
*** rcrafton has joined #zope3-dev | 15:24 | |
*** J1m has joined #zope3-dev | 15:25 | |
*** niemeyer has joined #zope3-dev | 15:26 | |
*** romanofski has quit IRC | 15:29 | |
*** mrevoir has joined #zope3-dev | 15:36 | |
*** b52laptop has quit IRC | 15:42 | |
*** b52laptop has joined #zope3-dev | 15:43 | |
*** markusleist has joined #zope3-dev | 15:49 | |
*** ferrafox_ has joined #zope3-dev | 15:50 | |
*** ferrafox has quit IRC | 15:50 | |
*** rocky|away is now known as rocky | 15:51 | |
*** philiKON_ has left #zope3-dev | 15:52 | |
*** dunny has joined #zope3-dev | 15:55 | |
*** Ariel_Calzada has quit IRC | 15:57 | |
*** cursor has quit IRC | 16:07 | |
*** mrevoir has quit IRC | 16:11 | |
*** elro has joined #zope3-dev | 16:14 | |
elro | Is 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 IRC | 16:19 | |
*** whit__ has quit IRC | 16:31 | |
*** whit__ has joined #zope3-dev | 16:32 | |
*** ferrafox_ has joined #zope3-dev | 16:35 | |
*** fcorrea has joined #zope3-dev | 16:47 | |
ccomb | Hello, how can I let every single instance of an object react to an event ? | 16:47 |
fcorrea | ccomb: a event must be sent in order to react to it. Then you need a subscriber for the reaction | 16:49 |
ccomb | instead of having a general subscriber function, I would like this function (or even method) to be triggered for every listening object instance | 16:49 |
ccomb | I'm sending an event from an object | 16:49 |
ccomb | this is an 'update' event | 16:49 |
ccomb | I want every other concerned object to self.update() also | 16:50 |
*** baijum has quit IRC | 16:50 | |
*** whit has joined #zope3-dev | 16:51 | |
*** whit has quit IRC | 16:53 | |
ccomb | should I provideHandler(self.method_to_launch) in the class__init__ ? | 16:53 |
*** torkel_ has joined #zope3-dev | 16:54 | |
fcorrea | ccomb: it would be a good try | 16:56 |
ccomb | (or maybe do this registration in a subscriber to IObjectCreatedEvent.) | 16:57 |
fcorrea | I just don't see how the object will react to it. How CA will find then component that subscribed for that | 16:57 |
*** J1m_ has joined #zope3-dev | 17:02 | |
*** pcardune has joined #zope3-dev | 17:03 | |
ccomb | mmh.. not easy. Since the subscriber must be an adapter, I would need to turn each instance method to an adapter | 17:04 |
ccomb | nonsense | 17:04 |
fcorrea | yep. Maybe you could wire some more python on it with some python descriptor tied to a event subscriber and then take control from that | 17:07 |
* fcorrea not sure if python descriptors can do that | 17:07 | |
ccomb | that does not solve the problem of registering every instance as a subscriber | 17:12 |
*** lucielejard has joined #zope3-dev | 17:12 | |
afd | ccomb: why not have a signle event handler that looks up the objects and does something with them? | 17:12 |
ccomb | that's just what I'm going to do, but I'm thinking of a more complex method :) | 17:13 |
ccomb | I 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 method | 17:14 |
afd | ccomb: 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 handlers | 17:14 |
ccomb | register the object themselves as event handler ? | 17:14 |
ccomb | why not | 17:15 |
afd | ccomb: subscriber to your event | 17:15 |
ccomb | yes subscriber | 17:15 |
*** whit__ has quit IRC | 17:17 | |
ccomb | it would be nice to be able to add a decorator to any method, to turn it into an event subscriber | 17:17 |
*** jukart has joined #zope3-dev | 17:17 | |
*** Ariel_Calzada has joined #zope3-dev | 17:19 | |
*** whit__ has joined #zope3-dev | 17:19 | |
*** stub has quit IRC | 17:24 | |
*** edgordon_ has quit IRC | 17:24 | |
ccomb | HEY | 17:25 |
*** nerdalert has joined #zope3-dev | 17:25 | |
ccomb | fcorrea afd : that's crazy, but that works! | 17:25 |
ccomb | Just two lines to add | 17:25 |
afd | ccomb: :) | 17:26 |
ccomb | I added a __call__ method to my class, and provideHandler(self, (IMyObject, IMyEvent)) at the end of the __init__ | 17:27 |
ccomb | when I notify, the __call__ is called for all my instances | 17:27 |
ccomb | zope3 is sooo great | 17:27 |
fcorrea | ccomb: Now try notifying 5000000 instances of those objects ;) | 17:32 |
ccomb | ;) | 17:32 |
ccomb | no, I won't have more than a few ones | 17:33 |
*** sorindregan has quit IRC | 17:33 | |
fcorrea | just 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 IRC | 17:35 | |
ccomb | There 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 objects | 17:38 |
*** whit has joined #zope3-dev | 17:38 | |
fcorrea | cool | 17:38 |
ccomb | an object should update() only if it receive an event from an object chained to it | 17:40 |
ccomb | Actually this event pattern could be used for a C-A based process workflow engine | 17:41 |
*** ferrafox_ is now known as ferrafox | 17:43 | |
*** whit has quit IRC | 17:50 | |
*** sm has joined #zope3-dev | 17:51 | |
*** whit__ is now known as wbuntu | 17:55 | |
*** rcrafton has quit IRC | 17:57 | |
*** rcrafton has joined #zope3-dev | 18:13 | |
*** wbuntu has quit IRC | 18:24 | |
*** wbuntu has joined #zope3-dev | 18:26 | |
*** mrevoir has joined #zope3-dev | 18:29 | |
*** vlado has quit IRC | 18:32 | |
*** markusleist has quit IRC | 18:47 | |
*** jsadjohnson has quit IRC | 18:47 | |
*** projekt01 has left #zope3-dev | 18:51 | |
*** philiKON has joined #zope3-dev | 18:57 | |
*** jukart has quit IRC | 18:59 | |
*** goschtl has quit IRC | 19:01 | |
*** alecm has joined #zope3-dev | 19:08 | |
*** wbuntu has quit IRC | 19:13 | |
*** wbuntu has joined #zope3-dev | 19:16 | |
*** norro has joined #zope3-dev | 19:18 | |
*** nathany has joined #zope3-dev | 19:18 | |
*** philiKON has quit IRC | 19:32 | |
*** philiKON has joined #zope3-dev | 19:34 | |
*** RaFromBRC has joined #zope3-dev | 19:37 | |
*** dunny has quit IRC | 19:41 | |
*** romanofs1i has quit IRC | 19:43 | |
*** ignas has joined #zope3-dev | 19:47 | |
*** ksmith99 has joined #zope3-dev | 19:48 | |
*** kleist has quit IRC | 19:53 | |
*** wbuntu has quit IRC | 19:58 | |
*** wbuntu has joined #zope3-dev | 20:00 | |
*** jodok has quit IRC | 20:10 | |
*** salfield has joined #zope3-dev | 20:13 | |
*** redir has joined #zope3-dev | 20:18 | |
*** pbugni has joined #zope3-dev | 20:25 | |
*** richardkan has quit IRC | 20:33 | |
*** J1m has quit IRC | 20:51 | |
*** naro has quit IRC | 20:53 | |
*** J1m has joined #zope3-dev | 20:53 | |
*** marianom has joined #zope3-dev | 20:58 | |
*** torkel_ has quit IRC | 21:00 | |
*** torkel_ has joined #zope3-dev | 21:00 | |
*** bigkev has joined #zope3-dev | 21:06 | |
*** wbuntu has quit IRC | 21:07 | |
*** wbuntu has joined #zope3-dev | 21:10 | |
*** mkerrin has quit IRC | 21:11 | |
*** b52laptop has quit IRC | 21:16 | |
*** bigkevmcd has quit IRC | 21:17 | |
*** torkel_ has quit IRC | 21:19 | |
*** torkel_ has joined #zope3-dev | 21:19 | |
*** ferrafox has quit IRC | 21:22 | |
*** romanofski has joined #zope3-dev | 21:27 | |
*** torkel_ has quit IRC | 21:27 | |
*** torkel_ has joined #zope3-dev | 21:27 | |
*** alecm has quit IRC | 21:28 | |
*** alecm has joined #zope3-dev | 21:28 | |
*** junkafarian has quit IRC | 21:37 | |
*** torkel_ has quit IRC | 21:40 | |
*** torkel_ has joined #zope3-dev | 21:40 | |
*** nathany has quit IRC | 21:42 | |
*** pbugni has quit IRC | 21:46 | |
*** rocky has quit IRC | 21:47 | |
*** mgedmin has quit IRC | 21:47 | |
*** wbuntu has quit IRC | 21:48 | |
*** wbuntu has joined #zope3-dev | 21:50 | |
*** tarek has quit IRC | 21:51 | |
*** tarek has joined #zope3-dev | 21:51 | |
*** torkel_ has quit IRC | 21:57 | |
*** torkel_ has joined #zope3-dev | 21:57 | |
*** rocky has joined #zope3-dev | 21:57 | |
*** jsadjohnson has joined #zope3-dev | 21:57 | |
*** lucielejard has quit IRC | 21:58 | |
*** Newfie2007 has quit IRC | 21:59 | |
*** J1m_ has joined #zope3-dev | 22:00 | |
*** Lumiere has quit IRC | 22:02 | |
*** torkel_ has quit IRC | 22:05 | |
*** torkel_ has joined #zope3-dev | 22:05 | |
*** torkel_ has quit IRC | 22:14 | |
*** torkel_ has joined #zope3-dev | 22:14 | |
*** torkel_ has quit IRC | 22:20 | |
*** torkel_ has joined #zope3-dev | 22:20 | |
*** b52laptop has joined #zope3-dev | 22:22 | |
*** J1m_ has quit IRC | 22:22 | |
*** sm is now known as sm-afk | 22:25 | |
*** torkel_ has quit IRC | 22:26 | |
*** torkel_ has joined #zope3-dev | 22:26 | |
*** Jell-O-Fishi has joined #zope3-dev | 22:26 | |
*** J1m_ has joined #zope3-dev | 22:33 | |
*** jodok has joined #zope3-dev | 22:34 | |
*** pbugni has joined #zope3-dev | 22:35 | |
*** elro has quit IRC | 22:37 | |
*** torkel_ has quit IRC | 22:45 | |
*** torkel_ has joined #zope3-dev | 22:45 | |
lisppaste6 | instantfoo pasted "getAdapters" at http://paste.lisp.org/display/45850 | 22:53 |
instantfoo | hi, i'm trying to retrieve all adapters that implements an interface and adapts a certain interface.. | 22:53 |
*** torkel_ has quit IRC | 22:54 | |
*** torkel_ has joined #zope3-dev | 22:54 | |
instantfoo | trying getAdapters in debugzope without success :( | 22:54 |
alecm | instantfoo: getAdapters requires a tuple of objects to adapt and an interface that the adapters provide, it returns a sequence of (name, adapted-object) pairs | 22:55 |
alecm | it'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 |
instantfoo | so if I want to get something like [<class '__main__.Foo'>, <class '__main__.FooBar'>], how would i go about? | 22:57 |
*** wbuntu has quit IRC | 22:57 | |
alecm | instantfoo: Then you want to use the APIs from zope.app.apidoc | 22:58 |
afd | instantfoo: I usually go to the zope.app.apidoc package to see how zope's apidoc does it, for this kind of stuff | 22:59 |
alecm | instantfoo: zope.app.apidoc.component.getRequiredAdapters and getProvidedAdapters | 22:59 |
*** wbuntu has joined #zope3-dev | 22:59 | |
instantfoo | cheers, I'll look into them | 22:59 |
*** MJ has joined #zope3-dev | 23:00 | |
*** torkel_ has quit IRC | 23:00 | |
*** greenman has joined #zope3-dev | 23:00 | |
*** torkel_ has joined #zope3-dev | 23:00 | |
alecm | good 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 |
instantfoo | actually, in my real use case my adapters are named :) | 23:01 |
instantfoo | maybe i should just name them in my simple interpreter test and play around with it | 23:02 |
*** torkel_ has quit IRC | 23:09 | |
*** torkel_ has joined #zope3-dev | 23:10 | |
*** ignas has quit IRC | 23:11 | |
instantfoo | hmm | 23:11 |
instantfoo | if i name the adapters.. provideAdapter(factory=Foo, name=u'afoo') | 23:14 |
instantfoo | shouldn't getAdapters work then? | 23:14 |
instantfoo | wait.. | 23:15 |
instantfoo | great, now the pastebin went down :) | 23:16 |
*** torkel_ has quit IRC | 23:17 | |
*** torkel_ has joined #zope3-dev | 23:17 | |
instantfoo | http://papernapkin.org/pastebin/view/1238 | 23:18 |
instantfoo | scroll down :) | 23:19 |
instantfoo | i guess what i want to do in my real use case is roughly.. | 23:23 |
*** dunny has joined #zope3-dev | 23:23 | |
instantfoo | for a in [<..Foo>, <..Bar>]: a(c).someFunc() | 23:24 |
instantfoo | but dynamically get that adapter list, obviously | 23:25 |
*** torkel_ has quit IRC | 23:30 | |
*** povbot` has joined #zope3-dev | 23:32 | |
*** mrevoir has quit IRC | 23:40 | |
*** torkel_ has quit IRC | 23:47 | |
*** torkel_ has joined #zope3-dev | 23:47 | |
*** jukart has joined #zope3-dev | 23:47 | |
*** wbuntu has quit IRC | 23:48 | |
*** pcardune has quit IRC | 23:48 | |
*** povbot has quit IRC | 23:50 | |
*** wbuntu has joined #zope3-dev | 23:50 | |
*** torkel_ has quit IRC | 23:55 | |
*** torkel_ has joined #zope3-dev | 23:55 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!