IRC log of #zope3-dev for Wednesday, 2007-06-20

*** harobed has quit IRC00:00
*** redir has joined #zope3-dev00:01
*** dobee has quit IRC00:22
*** jodok has left #zope3-dev00:27
*** jodok has joined #zope3-dev00:27
jodokTheuni: ping00:27
*** RaFromBRC is now known as RaFromBRC|lunch00:27
*** pelle_ has quit IRC00:29
*** jinty has joined #zope3-dev00:31
*** Aiste has quit IRC00:33
*** schwendinger has joined #zope3-dev00:37
*** jsadjohnson has quit IRC00:47
*** pcardune has quit IRC00:48
*** jfroche has quit IRC00:54
*** dennis_ has joined #zope3-dev00:57
*** dennis_ has quit IRC00:58
*** torkel_ has joined #zope3-dev00:58
*** dennis_ has joined #zope3-dev00:58
*** natea|lunch has quit IRC01:01
*** RaFromBRC|lunch is now known as RaFromBRC01:02
*** jinty has quit IRC01:05
*** J1m_ has quit IRC01:05
*** benji has quit IRC01:07
*** jsadjohnson has joined #zope3-dev01:09
*** faassen has quit IRC01:11
*** natea|lunch has joined #zope3-dev01:14
*** norro has quit IRC01:14
*** nerdalert has quit IRC01:19
*** schwendinger has quit IRC01:24
*** timte has quit IRC01:29
*** natea|lunch is now known as natea01:33
*** projekt01 has joined #zope3-dev01:34
*** jsadjohnson has quit IRC01:36
*** WebMaven_ has joined #zope3-dev01:40
*** pcardune has joined #zope3-dev01:43
*** andrew_m has quit IRC01:52
*** jsadjohnson has joined #zope3-dev01:55
*** WebMaven has quit IRC01:55
*** WebMaven_ has quit IRC01:56
*** natea has quit IRC02:00
*** oferw has quit IRC02:02
*** natea|iceland has joined #zope3-dev02:04
*** jsadjohnson has quit IRC02:07
*** J1m has quit IRC02:09
*** jodok has quit IRC02:29
pcardunesrichter: ping02:34
pcarduneprojekt01: ping02:36
projekt01pcardune, yup02:41
pcarduneprojekt01: regarding your email, the fullName required object was necessary so that the fullName would be passed to the constructor of JSButtonAction, which is how ButtonAction gets constructed as well02:42
pcardunethat is why I put it in there, although I do agree that a string for a required object doesn't make sense02:42
projekt01ouch02:42
pcardunedo you know if srichter was talking about making form and context required objects for all IFieldWidget adapters? or just for my specific case of buttonAction adaptation?02:43
pcarduneI think the former would be really cool02:43
projekt01pcardune, then we should write a adapter factory which does the name handling, but I'm not sure because I didn't look at the code.02:43
pcarduneprojekt01: an adapter factory? how would that work?02:44
projekt01pcardune, is your sandbox working?02:44
pcardunetests don't pass yet02:45
projekt01a factory is a method which lets you define a adapter call, this factory knows the name (string). This factory is registered as adapter.02:45
projekt01this means the (method) adapter is a hook which dispatches the adapter call and calls the constructor of the button.02:46
pcardunebut how does the factory know the name?02:46
pcarduneooh02:46
projekt01hardcoded02:46
pcardunei think I understand02:46
projekt01the adapter call in the form doesn't know and use the name, you can delegate this into the adapter factory.02:47
projekt01But I'm really not sure if this will fit for you uscase. It's just a patter which can be used for adapters.02:48
pcardunethat would be similar to setting the name after construction?02:49
projekt01pcardune, is it in the zobby sandbox?02:49
projekt01yes, if this is possible, its better to set a attribute later02:50
pcarduneprojekt01: are you looking for my use case or for my modification to z3c.form?02:50
pcardunez3c.formjs is in http://svn.zope.org/Sandbox/pcardune/z3cFormJS/trunk/02:51
projekt01both02:51
pcardunethe modification to z3c.form is in http://svn.zope.org/z3c.form/branches/pcardune-tweaks/02:52
projekt01Do you hava a working trunk somewhere or do I have to move the package to a own working zope302:52
pcarduneI do not have my own working trunk02:52
projekt01is the zobby trunk working?02:53
pcarduneas far as I remember yes02:53
pcardunebut it does not include any of that stuff02:53
pcarduneas soon as I start developing demos, i'll have a working trunk02:53
projekt01cool02:54
pcarduneunfortunately, the name can't be set later because it is used right away in __init__ to construct the Action object02:54
pcardunein any case, setting the name afterwords would seem very bad form02:55
projekt01can we change the __init__?02:55
pcarduneactually, it wouldn't be so bad02:55
pcardunebecause the Action.__init__ doesn't do anything interesting to the name, although it will generate one if it gets None02:56
projekt01Yes, yo can set None and later set the name, right?02:58
pcarduneyes02:58
pcardunein fact, the name defaults to None02:58
projekt01yes, and set the name later, will override the title as name which get used if name=None02:59
pcardunebut I'm still not clear on where this overriding is supposed to happen03:00
pcarduneIf i understand correct, there is a function that adapts request, button to IFieldWidget03:00
pcardunethe function creates the custom ButtonAction implementation and sets the name03:01
pcardunebut how does it know the name?03:01
*** natea|iceland has quit IRC03:01
projekt01I'm lookin at line 231 in field.py that's what we should do for the button action.03:01
pcarduneok, that is what I was originally thinking03:02
pcarduneI thought you were talking about something more complicated03:02
projekt01and why not support a actionFactory attribute for IButton03:02
pcarduneto allow for more specific customization?03:04
projekt01for custom widget, we offer a widgetFactory attribute which allows you to define custom widget classes at a class level in the form.03:05
projekt01e.g. fields['foo'].widgetFactory = FooWidget03:05
pcarduneI like this idea03:06
projekt01But i'm a little bit lost right now. What was the usecase for your changes?03:06
pcardunesounds good, I'll make those changes03:06
pcardunewell, I wanted to create my own javascript buttons but use them in the same way as the regular buttons03:07
pcarduneincluding putting them in the same buttons container03:07
pcarduneand it just made sense to put them in the same actions container as the rest of the buttons03:08
projekt01are you looking for a way taht your custom button get used instead of the original button?03:08
pcarduneright03:08
projekt01Ah, cool, this measn you can use existing forms and apply javascript buttons later.03:09
projekt01Argh, I can't type today03:09
pcarduneyes03:10
*** natea|iceland has joined #zope3-dev03:18
*** benji has joined #zope3-dev03:22
*** wrobel has quit IRC03:25
*** alecm has quit IRC03:29
*** febb has joined #zope3-dev03:32
*** alecm has joined #zope3-dev03:34
*** alecm has quit IRC03:38
*** tjs has joined #zope3-dev03:39
*** b52GM has quit IRC03:39
*** redir has quit IRC03:46
*** ZopeIn has joined #zope3-dev04:20
ZopeInCould anyone give me a hint how to add an object into a folder which happens to be an attribute of another object? I have this forbiddenAttribute error when I try self.context.anAttribute[name]=obj04:23
*** huajie has joined #zope3-dev04:25
pcarduneZopeIn: it is probably security proxied04:25
pcardunetry using the removeSecuriyProxy function as in removeSecurityProxy(self.context).anAttribute[name]04:26
ZopeInbut removeSecurityProxy does not solve the problem either04:26
pcarduneis the attribute defined in the interface the view is for/04:27
pcardune?04:27
pcarduneI think a browser view can only access those attributes defined in the interface which the view is registered for04:28
pcarduneI'm not positive though04:28
ZopeInalright, removeSecurityProxy worked, thanks a lot, buddy04:28
pcarduneno problem04:28
*** pcardune is now known as pcardune_climbin04:29
*** niemeyer has quit IRC04:34
projekt01pcardune, it's important the you locate the attribute if it's a object or a container.04:36
projekt01you can do this with the locate method like:04:37
projekt01zope.location.locate(subobject, self, u'the name')04:37
projekt01and don't forget to fire the object created event if you add a object in a __init__ method as a attribute04:38
*** febb has quit IRC04:43
*** WebMaven has joined #zope3-dev04:51
*** ZopeIn has quit IRC05:03
*** projekt01 has quit IRC05:34
*** RaFromBRC has quit IRC05:38
*** rcrafton has joined #zope3-dev05:47
*** whit has quit IRC06:12
*** stub has joined #zope3-dev06:30
*** harobed has joined #zope3-dev06:31
*** cursor has joined #zope3-dev06:36
*** rcrafton has quit IRC06:47
*** torkel_ has quit IRC06:48
*** greenman has quit IRC06:54
*** cursor has quit IRC07:11
*** baijum has joined #zope3-dev07:18
*** alecm has joined #zope3-dev07:22
*** dobee has joined #zope3-dev08:05
*** afd__ has joined #zope3-dev08:19
*** dobee has quit IRC08:35
*** zagy has joined #zope3-dev08:47
*** jukart has joined #zope3-dev08:48
*** dobee has joined #zope3-dev08:48
*** dobee has quit IRC08:50
*** dobee has joined #zope3-dev08:51
*** sorin has joined #zope3-dev08:55
*** sorin is now known as sorindregan08:56
*** d2m has joined #zope3-dev08:56
tjsI have an annotation that has an attribute 'reminders' that is a PersistentList that defaults to ['email']09:00
tjsin the interface this is a schema.Choice with a SimpleVocabulary09:01
tjsand in the view I use a MultiCheckBoxWidget to render it09:01
tjseverything is fine, it renders, I can update the options09:01
tjsexcept if I unselect everything09:02
tjsthen I get a type error09:02
tjsseems pretty flakey09:02
*** romanofski has quit IRC09:03
*** ghendi has joined #zope3-dev09:10
*** RaFromBRC has joined #zope3-dev09:14
*** greenman has joined #zope3-dev09:17
*** iam-vivek has joined #zope3-dev09:24
*** jodok has joined #zope3-dev09:26
*** schwendinger has joined #zope3-dev09:31
*** iam-vivek is now known as nikhil_n09:32
*** wrobel has joined #zope3-dev09:33
*** alecm has quit IRC09:33
*** RaFromBRC has quit IRC09:40
*** pelle_ has joined #zope3-dev09:47
*** romanofski has joined #zope3-dev09:53
romanofskimoin09:54
*** yvl has joined #zope3-dev09:56
*** Aiste has joined #zope3-dev10:04
*** harobed has quit IRC10:07
*** nikhil_n has quit IRC10:13
*** wreutz has joined #zope3-dev10:16
*** pcardune_climbin has quit IRC10:33
*** timte has joined #zope3-dev10:39
*** reco has joined #zope3-dev10:39
*** romanofski has quit IRC10:46
*** kleist has joined #zope3-dev10:47
*** harobed has joined #zope3-dev10:53
*** RedDevils has joined #zope3-dev10:59
*** malthe has joined #zope3-dev11:03
*** RedDevils has quit IRC11:04
*** RedDevils has joined #zope3-dev11:05
*** RedDevils has left #zope3-dev11:05
*** RedDevils has joined #Zope3-dev11:06
*** andrew_m has joined #zope3-dev11:14
*** Aswin_S has joined #Zope3-dev11:18
*** Aswin_S is now known as nikhil_n11:18
*** schwendinger_ has joined #zope3-dev11:27
*** Aiste has quit IRC11:29
*** MJ has joined #zope3-dev11:34
*** schwendinger has quit IRC11:34
*** schwendinger has joined #zope3-dev11:34
*** jfroche has joined #zope3-dev11:44
*** schwendinger_ has quit IRC11:51
*** Aiste has joined #zope3-dev11:53
*** jodok has quit IRC12:00
*** jodok has joined #zope3-dev12:01
*** dunny has joined #zope3-dev12:03
*** jinty has joined #zope3-dev12:03
*** philiKON has joined #zope3-dev12:06
*** dobee has left #zope3-dev12:09
*** dobee has joined #zope3-dev12:09
dobeetest12:09
timteworks  :)12:11
*** malthe_ has joined #zope3-dev12:13
*** richardkan has joined #zope3-dev12:14
malthe_nikhil_n:   Ran 144 tests with 0 failures and 0 errors in 16.296 seconds.12:18
nikhil_nthat means its ok in python2.5 now12:19
nikhil_ni also tried for making it working in both versions12:20
nikhil_nwhen i ran tests its working in both versions12:21
nikhil_nmalthe , thanks helping12:22
*** romanofski has joined #zope3-dev12:23
*** philiKON_ has quit IRC12:23
*** |RedDevi| has joined #Zope3-dev12:26
*** RedDevils has quit IRC12:26
*** |RedDevi| has left #Zope3-dev12:29
*** |RedDevi| has joined #Zope3-dev12:29
*** malthe has quit IRC12:30
*** |RedDevi| has quit IRC12:30
*** RedDevils has joined #Zope3-dev12:30
*** drzoltron has joined #zope3-dev12:34
*** drzoltron has left #zope3-dev12:34
*** dobee has quit IRC12:38
*** jodok_ has joined #zope3-dev12:38
*** jodok has quit IRC12:38
*** dobee has joined #zope3-dev12:38
*** jukart has quit IRC12:38
*** jukart has joined #zope3-dev12:39
*** dobee has quit IRC12:40
*** jodok_ has quit IRC12:40
*** jukart has quit IRC12:40
*** jukart has joined #zope3-dev12:40
*** jodok has joined #zope3-dev12:40
*** dobee has joined #zope3-dev12:40
*** RedDevils has quit IRC12:41
*** Aswin_S has joined #zope3-dev12:43
*** jinty has quit IRC12:43
*** WebMaven has quit IRC12:44
*** schwendinger has quit IRC13:02
*** nikhil_n has quit IRC13:08
*** mgedmin has joined #zope3-dev13:11
*** Aswin_S has quit IRC13:16
*** coolestuk has joined #zope3-dev13:22
*** stub has quit IRC13:31
*** natea|iceland is now known as natea13:58
*** MJ is now known as MJ|lunch13:59
*** schwendinger has joined #zope3-dev14:02
*** dunny has quit IRC14:03
*** torkel_ has joined #zope3-dev14:09
*** huajie has quit IRC14:14
*** benji has quit IRC14:18
*** rocky|away is now known as rocky14:24
*** ignas has joined #zope3-dev14:26
*** MJ|lunch is now known as MJ14:32
*** ghendi has quit IRC14:37
*** schwendinger_ has joined #zope3-dev14:44
*** sorindregan has quit IRC14:47
*** jinty has joined #zope3-dev14:50
*** malthe_ is now known as malthe|away14:51
*** Newfie2007 has joined #zope3-dev14:53
*** greenman has quit IRC14:56
*** benji has joined #zope3-dev15:00
*** schwendinger has quit IRC15:01
*** ktwilight_ has quit IRC15:02
*** ktwilight has joined #zope3-dev15:03
*** norro has joined #zope3-dev15:05
*** faassen has joined #zope3-dev15:05
*** projekt01 has joined #zope3-dev15:12
*** schwendinger_ has quit IRC15:19
*** J1m has joined #zope3-dev15:20
*** niemeyer has joined #zope3-dev15:22
*** norro_ has joined #zope3-dev15:30
*** wrobel` has joined #zope3-dev15:34
*** wrobel has quit IRC15:35
*** wrobel` is now known as wrobel15:35
*** jinty has quit IRC15:40
*** schwendinger has joined #zope3-dev15:40
*** norro has quit IRC15:40
*** Jell-O-Fishi has joined #zope3-dev15:41
*** jinty has joined #zope3-dev15:44
*** salfield has joined #zope3-dev15:59
*** norro_ has quit IRC16:00
*** sorin has joined #zope3-dev16:01
*** sorin is now known as sorindregan16:01
*** redir has joined #zope3-dev16:10
*** coolestuk has quit IRC16:15
*** cursor has joined #zope3-dev16:16
*** cursor has quit IRC16:18
*** cursor has joined #zope3-dev16:19
*** baijum has quit IRC16:30
*** coolestuk has joined #zope3-dev16:35
*** rcrafton has joined #zope3-dev16:56
*** derek|office is now known as derek_richardson16:59
*** rcrafton has quit IRC17:03
*** pandres has quit IRC17:05
*** rcrafton has joined #zope3-dev17:06
*** whitness has joined #zope3-dev17:06
*** whitness is now known as whit17:10
*** alecm has joined #zope3-dev17:11
*** pandres has joined #zope3-dev17:13
*** rcrafton has quit IRC17:14
*** pandres has quit IRC17:16
*** stub has joined #zope3-dev17:17
*** afd__ has quit IRC17:24
*** alecm has quit IRC17:25
*** pelle_ has quit IRC17:26
*** alecm has joined #zope3-dev17:30
*** rocky is now known as rocky|away17:38
*** rcrafton has joined #zope3-dev17:39
*** sorindregan has quit IRC17:41
*** whit has quit IRC17:41
*** whit has joined #zope3-dev17:41
*** cursor has quit IRC17:49
*** whit has quit IRC17:53
*** schwendinger_ has joined #zope3-dev17:55
*** pcardune_climbin has joined #zope3-dev18:01
*** pandres has joined #zope3-dev18:04
*** pcardune_climbin is now known as pcardune18:04
*** malthe|away is now known as malthe18:06
*** schwendinger has quit IRC18:08
*** schwendinger has joined #zope3-dev18:08
*** nerdalert has joined #zope3-dev18:09
*** wreutz has quit IRC18:11
*** coolestuk has quit IRC18:12
*** stub has quit IRC18:15
*** lucielejard has joined #zope3-dev18:20
*** timte has quit IRC18:23
*** mgedmin has quit IRC18:24
*** mgedmin has joined #zope3-dev18:24
*** afd_ has quit IRC18:25
*** schwendinger_ has quit IRC18:25
*** jukart has quit IRC18:27
*** rlo has joined #zope3-dev18:30
*** rlo has quit IRC18:31
*** rlo has joined #zope3-dev18:31
xbeanxWhat is the difference between a BrowserPage and a BrowserView ?18:33
xbeanxIs a BrowserView supposed to be a view of an object?18:33
*** rlo has quit IRC18:36
dennis_xbeanx a page is a complete page, which you can access with a browser. A view is something which does not have to be a whole page, and which you can only reference from inside other views, pages or viewlets, like the loginlogout view, which presents a login link and username, but is not its own page18:38
dennis_thats as far as I understand it18:38
xbeanxdennis_: makes sense...  I was totally off course on that one..18:39
*** projekt01 has quit IRC18:44
*** MJ has quit IRC18:45
*** jodok has quit IRC18:48
*** redir has quit IRC18:48
*** derek_richardson has quit IRC18:50
*** ctp has joined #zope3-dev18:50
ctphi folks. i am relatively new to zope+plone. i have put a navtree.py and an overrides.zcml into an existing product (LinguaPlone) to extend Plone's navtree functionality, but it seems that they're not loaded properly. should the overrides.zcml be loaded automagically restarting zope or have i to modify some other existing files?18:52
*** rocky|away is now known as rocky18:54
CrippsI have a *site* implemented, but when I create an instance of the site, I don't have the add menu in the ZMI ... what is the most likely thing that I'm missing?19:09
Crippsgosh, that question wasn't very clear at all ...19:09
*** norro has joined #zope3-dev19:11
CrippsI have a site whose interface extends IPossibleSite and IContainer (as per Phil's book), and the Container is turned into a site on instantiation, I would like to use the ZMI to add components to the site, but there is no add menu on the left of the ZMI under the site ... so, I know I'm missing something, I just don't know what (since Folder does have the Add menu after Turning a Folder instance into a site).19:11
*** alga has joined #zope3-dev19:14
*** harobed_ has joined #zope3-dev19:15
*** timte has joined #zope3-dev19:18
Crippsso essentially, what I'm asking is: how do I ensure that a (sub)site retains the Add menu from the ZMI.19:23
*** whit has joined #zope3-dev19:27
*** jsadjohnson has joined #zope3-dev19:27
*** kleist has quit IRC19:31
*** b52lap has quit IRC19:32
*** malthe has quit IRC19:33
*** coolestuk has joined #zope3-dev19:35
*** jsadjohnson has quit IRC19:35
*** schwendinger has quit IRC19:36
*** cursor has joined #zope3-dev19:36
*** natea has quit IRC19:36
*** b52lap has joined #zope3-dev19:38
*** dobee has quit IRC19:40
norroCripps by implementing adequat container and contained interfaces to the objects?19:40
Crippsnorro: I've got contained in my Site interface, I can try adding container to another component and see if that works ... I thought that contains and container just constrained the type of objects you could put into a container though ...19:42
*** jsadjohnson has joined #zope3-dev19:43
Crippsnorro: no, that isn't working. :/19:47
*** jfroche has quit IRC19:47
*** derek_richardson has joined #zope3-dev19:48
norrohmmm, months ago i did that stuff, so I'm really not sure. Unfortunately I can't have a look at the sources right now19:49
Crippsnorro: that's ok. Thanks for the attempt :)19:49
norroI based it on srichters book as far as i can remember19:50
norronp :)19:50
*** norro has quit IRC19:50
CrippsI'm doing mine on phil's book ;)19:50
Cripps*based on phil's book19:50
*** coolestuk has quit IRC19:51
*** harobed_ has quit IRC19:54
*** yvl has quit IRC19:58
*** RaFromBRC has joined #zope3-dev19:58
*** coolestuk has joined #zope3-dev20:00
*** derek_richardson has quit IRC20:02
*** reco has quit IRC20:06
*** coolestuk has quit IRC20:08
*** derek_richardson has joined #zope3-dev20:09
*** coolestuk has joined #zope3-dev20:12
*** jsadjohnson has quit IRC20:14
CrippsphiliKON: are you around?20:24
*** dunny has joined #zope3-dev20:25
*** coolestuk has quit IRC20:35
*** coolestuk has joined #zope3-dev20:36
*** richardkan has quit IRC20:37
*** wreutz has joined #zope3-dev20:42
*** ignas has quit IRC20:53
*** wreutz_ has joined #zope3-dev20:56
*** Newfie2007 has quit IRC20:59
*** Newfie2007 has joined #zope3-dev21:00
*** redir has joined #zope3-dev21:02
*** coolestuk has quit IRC21:03
*** redir has quit IRC21:03
*** redir has joined #zope3-dev21:03
*** redir has quit IRC21:04
*** rlo has joined #zope3-dev21:04
*** wreutz has quit IRC21:05
*** schwendinger has joined #zope3-dev21:11
*** romanofski has quit IRC21:15
*** redir has joined #zope3-dev21:15
*** jsadjohnson has joined #zope3-dev21:16
*** whit is now known as whit|lunch21:18
*** jodok has joined #zope3-dev21:21
*** rlo has quit IRC21:21
*** jsadjohnson has quit IRC21:32
*** whit|lunch is now known as whit21:32
*** pelle_ has joined #zope3-dev21:45
*** natea|break has joined #zope3-dev21:47
*** redir has quit IRC22:06
*** jfroche has joined #zope3-dev22:09
*** cursor has left #zope3-dev22:09
*** jfroche has quit IRC22:09
*** jfroche has joined #zope3-dev22:09
*** jkakar_ has joined #zope3-dev22:11
*** romanofski has joined #zope3-dev22:11
*** malthe has joined #zope3-dev22:12
*** jkakar has quit IRC22:13
*** jkakar_ is now known as jkakar22:15
*** pcardune is now known as pcardune_lunch22:17
*** jfroche has quit IRC22:19
*** natea|break is now known as natea22:23
*** salfield has quit IRC22:34
*** natea_ has joined #zope3-dev22:38
*** Aiste has quit IRC22:41
*** RaFromBRC is now known as RaFromBRC|lunch22:42
*** natea has quit IRC22:44
*** Aiste has joined #zope3-dev22:44
*** Newfie2007 has quit IRC22:54
ccombHi, is there a way to know why a security proxy forbids some access ?22:55
pcardune_lunchccomb: no not really... at least it's not easy22:56
*** BjornT has quit IRC22:56
pcardune_lunchccomb: but if you find out how, let me know22:56
*** pcardune_lunch is now known as pcardune22:56
J1mA forbidden error is *always* caused by a lack of a declaration for an attribute.22:56
J1mYou just need to look at the declarations for the object you get the forbidden error for.22:57
*** redir has joined #zope3-dev22:57
ccombJ1m: That's what I'm searching for 1 hour23:00
J1mWhat does the exception say?23:00
*** BjornT has joined #zope3-dev23:01
ccombI'm trying to write an object attribute in a IObjectModifiedEvent23:01
ccombThe exact same action works in the IObjectAddedEvent23:01
ccombthe attribute is part of the object interface and is zcml declared with  set_schema23:02
J1mWhere did you get the IObjectModified event?  Is this in a subscriber?23:02
ccombI get the error in the subscriber23:02
ccombThe odd thing is I can write an attribute which is part of a upper interface, but not the one of the objects interface23:03
*** mgedmin has quit IRC23:04
J1mMay I see the exception?23:04
* ccomb pasting23:05
TheuniHey J1m23:06
TheuniWhat's your notion of ZODB's ACID compatibility?23:07
ccombJ1m : http://pastebin.ca/57971723:07
ccombIs zope.interface.Attribute  taken into account with  set_schema declaration ?23:11
*** harobed_ has joined #zope3-dev23:16
*** schwendinger_ has joined #zope3-dev23:17
*** derek_richardson is now known as derek|office23:17
ccombI've added a set_attributes declaration and it works but....23:17
ccombwithout this declaration I was able to write this attribute from the IObjectAddedEvent subscriber23:17
*** schwendinger has quit IRC23:18
*** stub has joined #zope3-dev23:21
*** pelle_ has quit IRC23:22
*** pelle_ has joined #zope3-dev23:22
J1mTheuni, I consider ZODB to have the ACID properties.23:24
J1mccomb, set_schema only looks at fields.23:24
ccombso why was I able to modify the attribute in the IObjectAddedEvent subscriber?23:25
pcarduneccomb: was it not security proxied?23:25
ccombyes it was23:25
J1mccomb, because the IObjectAddedEvent has an unproxied object and IObjectModifiedEvent has a proxied object.23:26
*** RaFromBRC|lunch is now known as RaFromBRC23:26
*** oferw has joined #zope3-dev23:26
J1mIt's not clear to me why an object added event should have an unproxied object.23:26
*** stub has quit IRC23:27
*** norro has joined #zope3-dev23:28
ccombah,  I've just check it's true, it's not proxied in the add event23:28
ccombSo one can do what we want in such a subscriber ?23:29
J1mLike I said, it's not clear that an add event should have unproxied data.23:29
J1mIf you're writing trusted code, you can do what you want in any case. After all, there's an API for removing security proxies.23:30
*** yvl has joined #zope3-dev23:30
ccombIt's assumed that if the principal has the permission to add the object, he can write anything on it ?23:30
*** rocky is now known as rocky|away23:30
ccombactually I don't see any reason why it should behave in a different manner from a modify event23:32
J1mThe security system tries to help you by restricting what you can do based on authorizationa nd protections settings.  If you find it's getting in your way and you want to be responsible for secure decisions yourself, then you can bypass the system, or use a "less restrictive" system like Grok's, which is actually more appropriate for many apps.23:32
TheuniJ1m: K. I'm arguing with Dieter on a German list right now that we can safely call it ACID compatible, although there is some weirdness in the ACID versus ANSI isolation levels going on and there is an easy way to provoke `write skews`.23:36
*** pelle_ has quit IRC23:36
J1mI don't know what you are referring to. Can you be more specific?23:37
TheuniHowever, I compared our ACIDness (ACIDity?) to oracle, ms sql, postgres and mysql and they have exactly the same problems and call themselve ACID compatible.23:37
TheuniJ1m: MVCC only implements "Snapshot isolation" which is not in all cases serializable23:37
TheuniAn easy way to provoke this:23:37
TheuniHave one object A that references object B23:38
TheuniThen (roughly) in transaction 1 you remove the reference from A to B. In Transaction 2 you update object B. This would give different results if the transactions were executed serialized than when run in parallel.23:38
TheuniAFAICT that's called a `write skew`.23:38
*** d2m has quit IRC23:39
TheuniDieter pointed out that a long outstanding bug in some catalog indexes caused quite some inconsistencies for them that way.23:39
TheuniRelational databases use "SELECT FOR UPDATE" to elevate read accesses to write accesses to allow conflict detection on values that were only read but used for a computational basis for values that were updated.23:40
TheuniThis is a work around for MVCC not detecting those conflicts.23:40
TheuniI imagine ZODB *could* detect those conflicts but I'm not sure there's a way with a reasonable performance.23:41
* Theuni stops talking and lets Jim catch up. 23:41
J1mOK, good point.  So here, the issue is that transaction 2 read an old value of A (to get to B) and therefore updated B.  I'll note that these transactions are serializable.  The serialization is transaction 2 before transaction 1.  I don't see how this simple case would lead to catalog problems, but I suppose that more complex cases could.23:44
Theuniit's rather simple23:44
*** wreutz_ has left #zope3-dev23:45
TheuniHis example was: An index that removes a set when it becomes empty and re-establishes it when it is needed again.23:45
TheuniOne transaction was updating the set, the other removing it. *bang* the updated set was gone.23:45
*** ktwilight_ has joined #zope3-dev23:46
J1mRight. That's different (and more comlex) than the original example you gave.23:46
J1mHm. This is a very interesting case.23:46
TheuniOh, I thought it's the same problem.23:47
J1mHere the inconsistency is not ZODB's fault, except to the case that BTrees happen to be packages with ZODB.23:47
TheuniAh right. At least it's related. ;)23:47
J1mNo.23:47
J1mNot really23:47
TheuniHumm.23:47
J1mIn the second example, both transactions are writing B.23:47
TheuniReally?23:48
J1mYes, you said that one transaction removes an item from the set and the other adds an item.23:48
TheuniNo23:48
*** timte has quit IRC23:48
TheuniOne removes the references to the set. The other one updates it.23:48
TheuniE.g:23:48
TheuniT1: self.myset = None23:48
TheuniT2: self.myset.add(X)23:48
J1mBut it only removes the reference when the set becomes empty.23:49
TheuniWhen it *would* become empty23:49
J1mThat is, it only removes the set when it has removed the last value.23:49
TheuniT1: if len(self.myset) == 1: self.myset = None23:49
TheuniWeird optimization decision.23:49
TheuniHowever, it should be serializable.23:49
J1mah, interesting.23:49
Theuni:)23:49
*** jodok_ has joined #zope3-dev23:50
J1mWell, thanks to conflict resolution, there would have been a problem even without the optimization.23:52
*** RaFromBRC has quit IRC23:52
J1mConflict resolution definately violates consistency.23:53
J1malso, this second case isn't serializable.23:53
*** RaFromBRC has joined #zope3-dev23:54
*** schwendinger_ has quit IRC23:54
J1mWell, this is an interesting example anyway.]23:54
J1mWell, this is an interesting example anyway.23:54
J1mThe catalog case is rather troublesome.23:55
*** schwendinger has joined #zope3-dev23:55
J1mI'll definitely put some thought into that.23:55
TheuniK. Want me to put that into the collector?23:57
J1msure23:58
TheuniI'm even more worried that I just picked this up because I called ZODB ACID compatible in my talks and Dieter stepped up and WARNED EVERYBODY IN BIG LETTERS THAT ZODB ISN'T ACID COMPATIBLE.23:58
TheuniAnd then he goes and says he had that problem for years and he didn't tell.23:58
TheuniGnah. :/23:59
J1mYeah23:59
*** ktwilight has quit IRC23:59
benjiTheuni: didn't you say that other major RDBMS act in similar ways?23:59

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