IRC log of #zope3-dev for Wednesday, 2005-03-09

*** __gotcha__ is now known as __gotcha00:00
*** Aiste has quit IRC00:00
*** ignas_ is now known as ignas00:12
*** __gotcha is now known as __gotchaway00:24
*** SureshZ has quit IRC00:26
*** jhauser has quit IRC00:33
*** GaryPoster has quit IRC01:01
*** `anthony has quit IRC01:02
projekt01J1m, do you really propose not to use LocationProxy and implement ILocation in trusted adapters?01:04
projekt01J1m, I'm pretty sure that I run into this problem because we get the object form a LocationProxyContainer where our objects already proxied with LocationProxy01:52
projekt01I think we can solve the problem if we could remove this LocationProxy and add a new LocationProxy in the LocationProxyContainer01:53
J1mprojekt01, It is very risky to be removing proxies.01:58
J1mI don't want to go there.01:59
J1mI don't know what the code in editview.py is trying to do.01:59
projekt01I think I get doubled proxies, but I'm not sure right now.01:59
*** benji_york has quit IRC01:59
J1mYes, you are getting double proxies, but what is that code in editview trying to accomplish?01:59
J1mDo you know?02:00
J1msrichter, do you know?02:00
projekt01Give a location for editing the object and make the events working. I think02:01
srichterhere, I am reading up...02:01
projekt01notify(ObjectModifiedEvent(content))02:01
J1mThe events don't need the adapter to have a __parent__02:02
srichterI did follow todays discussion , so I am at a lost02:03
J1mI haven't followed the details either.02:04
J1mBut it revolves around ...02:04
projekt01Was there in the past something which needs a Location on editing a object in the edit view? I'm sure removing Location proxy out of the edit view  wasn't possible before. Now it seems to work02:04
J1m    def _setUpWidgets(self):02:04
J1m        adapted = self.schema(self.context)02:04
J1m        if adapted is not self.context:02:04
J1m            if not ILocation.providedBy(adapted):02:04
J1m                adapted = LocationProxy(adapted)02:04
J1m            adapted.__parent__ = self.context02:04
J1m        self.adapted = adapted02:04
J1m        setUpEditWidgets(self, self.schema, source=self.adapted,02:04
J1m                         names=self.fieldNames)02:04
J1min editview.py02:04
J1mspecifically, the business with the location proxy.02:05
J1mI don't know who added that code, but I have no idea what it was intended to do and it's causing problems now.02:05
J1mprojekt01, there are three possibilities:02:06
projekt01I listen02:06
J1m1. It could help with security *if* the adapter was not already proxied and if something in the editview code was going to proxy it.  The former isn't always true, as you found out. The later wasn't true until recently, so I don't think security is the reason.02:07
J1m2. It could have been for component lookup in the distant past.  The lines are old enough that that is the most likely explanation. This certainly isn't an issue now.02:08
J1m3. If the adapter, or more specifically, the fields or widgets need to acquire something, then __parent__ would be necessary.  But, in that unusual case, the author of the adapter could set __parent__ in the constructor.02:10
J1mover02:10
projekt01I think No. 2 I can checkout, I try to remove it run all tests and commit it to the trunk. I think it's Ok, if we add the Ilocation to the adapter if needed.02:11
J1mThat's my opinion too. :)02:12
projekt01I try it, I send you a note if I see other problems, thanks02:13
J1mk, thanks02:13
J1mso basically, we're talking about removing:02:13
J1m        if adapted is not self.context:02:13
J1m            if not ILocation.providedBy(adapted):02:13
J1m                adapted = LocationProxy(adapted)02:13
J1m            adapted.__parent__ = self.context02:13
projekt01Yes02:13
J1mcool02:14
projekt01If it's working and all test will run ;-)02:14
J1mwell, they probably won't.02:14
J1mI suspect that there are tests for those lines.02:14
J1mThe question is whether the tests will reveal the intent.02:15
projekt01I'll check it02:15
projekt01Is there a method like isTrusted() similar to isProxy() or how can I test if a adapter is trusted?02:19
J1mwhy do you care?02:19
projekt01I'm not really sure what the object is which fails in my usecase02:19
projekt01This proxies are really little secrets02:20
J1mOne way to spot a trusted adapter is that it is security proxied.  Normally, adapters aren't security proxied unless they are passed to untrusted code.02:20
projekt01Hm, if I print out the object I get: self.adapted  <amadeus.internet.dom.adapters.HTMLDocumentI18nSwitchForInternetDocument object at 0x03ADF5F0>02:22
projekt01If I test it like isProxy(adapted) I get True02:22
projekt01This means it's a trusted adapter. This whould be correct, it is.02:23
J1mIt is most likely a trusted adapter.02:23
J1mCan't you tell by looking at the zcml?02:24
projekt01Yes it is a trusted adapter in zcml02:24
J1mBTW, the easiest way to tell if something is security proxied is to look at type(ob)02:25
*** `anthony has joined #zope3-dev02:25
projekt01Ok I see, but there I can't see if it's a trusted adapter, right?02:27
projekt01adapted  <amadeus.internet.dom.adapters.HTMLDocumentI18nSwitchForInternetDocument object at 0x03ADF570>02:27
projekt01isProxy(adapted)  True02:27
projekt01type(adapted)  <type 'zope.security._proxy._Proxy'>02:27
J1mall you can tell is that it's a security proxy.  You can't tell if it got that way by being trusted.02:28
J1mWhy do you need to know if it is trusted?02:28
projekt01I like to understand what's going on.02:28
projekt01;-)02:28
J1mOK02:29
projekt01Perhaps there is another problem, because we us a LocationProxyContainer which proxies ites item02:29
J1mWell, if you get a proxied object from an adapter lookup today, it was almost certainly a trusted adapter.02:29
J1mI don't know what you mean.02:30
projekt01We use a ICOntainer implementation which proxies it's item. This makes it possible to show a object on another location too02:31
projekt01This is the base concept of our framework02:31
J1mProxies suck.02:31
*** tvon|desk has quit IRC02:31
J1mThey are sometimes-necessary deep black magic.02:32
J1mif you go there, be prepared for pain. :)02:32
projekt01Yup02:32
J1mI avoid them whenever I can.02:32
J1mBut we too use proxies to allow objects to be in multiple places.02:32
projekt01But if it's working you can do incredible things02:33
projekt01Yup that's ecaxtly what I mean we have to show the object in different locations02:33
J1mWe have symbolic-link-like objects that create proxies when they are traversed so application code can determine access paths, for example for generating bread crumbs.02:33
J1mThese haven't run afoul of the security machinery.02:34
projekt01Ah right, breadcrumb was also a part that doesn't work without location.02:35
projekt01J1m, all tests are Ok, if I comment out the part in the editview02:36
projekt01#if adapted is not self.context:02:36
projekt01        #    if not ILocation.providedBy(adapted):02:36
projekt01        #        adapted = LocationProxy(adapted)02:36
projekt01        #    adapted.__parent__ = self.context02:36
J1mawesome02:37
projekt01Should I commit it?02:37
J1myup02:37
projekt01Ok, I will cklick arround the ZMI first, to make sure all is working fine in reality.02:38
J1m:)02:38
projekt01srichter, If I set the frontpage in the wiki to the parent of itself I get maximum recursion error.02:44
projekt01Like:02:44
projekt01RuntimeError: maximum recursion depth exceeded02:44
*** J1m has quit IRC02:51
srichteryep02:56
projekt01I found a exactly description in the adding.py view which describes the problem which I have.02:57
projekt01# TODO: If the factory wrapped by LocationProxy is already a Proxy,02:57
projekt01        #       then ProxyFactory does not do the right thing and the02:57
projekt01        #       original's checker info gets lost. No factory that was02:57
projekt01        #       registered via ZCML and was used via addMenuItem worked02:57
projekt01        #       here. (SR)02:57
projekt01srichter, ;-)02:57
projekt01I'll post it to the mailing list and add it to the commit message02:57
srichterI think I never implemented the recursive linking prevention in the wiki code02:57
srichteryeah, I remember the problem02:58
srichterit was fairly deep02:58
projekt01Yup, I deeeeeeped today also into this02:58
srichter"deep" is not a verb :-)02:59
srichteryou can use "dive"03:00
srichterI dove deep into the issue today03:00
projekt01Ah, thanks, I really have to learn it once.03:01
srichter"once" should be "at some point"03:01
srichterit works in German, but not in English ;-) - A common German-native speaker mistake ;-)03:02
projekt01;-)03:02
projekt01Hm, Do you use edit wizards? The EditWizardView use also the LocationProxy.03:04
projekt01Or do you know where they are used?03:05
srichteris anyone using them? :-)03:05
srichterthey are not used03:05
projekt01Ok, I try to remove the LocationProxy also form the EditWizardView.03:06
srichteryeah03:07
projekt01Hm, Is anyone using the DisplayView?03:07
projekt01;-)03:07
srichterthe location proxy should not be necessary anymore, since all views must keep track of their parent and name anyways now03:07
srichteryes, this one is used by Zope Corp03:07
srichterFred has been using it IIRC03:08
*** hazmat has quit IRC03:08
projekt01IIRC ?03:08
*** bskahan has quit IRC03:08
*** bskahan has joined #zope3-dev03:11
srichterIIRC = if I remember correctly03:13
*** tvon has quit IRC03:22
*** hazmat has joined #zope3-dev03:45
*** stub has joined #zope3-dev03:56
*** hazmat has quit IRC03:59
*** projekt01 has left #zope3-dev04:22
*** hazmat has joined #zope3-dev04:52
*** hazmat has quit IRC05:55
*** jack-e|away has quit IRC06:01
*** xena has quit IRC06:01
*** vinsci has quit IRC06:01
*** jack-e|away has joined #zope3-dev06:01
*** xena has joined #zope3-dev06:01
*** vinsci has joined #zope3-dev06:01
*** stub has quit IRC06:35
*** hazmat has joined #zope3-dev06:36
*** Pupeno has joined #zope3-dev06:42
PupenoHello!06:42
PupenoI have downloaded and compiled (and now, run) zope 3 from svn... I understand that I can put my products on lib/python, but, is there a better way to locate my products so they are separated of Zope ?06:43
*** BjornT has quit IRC06:44
*** stub has joined #zope3-dev06:50
*** Pupeno has quit IRC07:08
*** hazmat has quit IRC07:48
*** stub has quit IRC08:12
*** d2m has quit IRC08:13
*** stub has joined #zope3-dev08:13
*** stub has quit IRC08:17
*** stub has joined #zope3-dev08:20
zagymoin08:36
*** stub has quit IRC08:43
*** stub has joined #zope3-dev08:43
*** viyyer has joined #zope3-dev08:52
*** htd has joined #zope3-dev08:58
*** d2m has joined #zope3-dev09:04
*** deo has quit IRC09:14
*** tav|offline has quit IRC09:14
*** hdima has joined #zope3-dev09:14
*** tav|offline has joined #zope3-dev09:17
*** tav|offline has quit IRC09:20
*** tav|offline has joined #zope3-dev09:22
*** jhauser has joined #zope3-dev09:52
*** bskahan has quit IRC10:00
*** vlado|away is now known as vlado10:10
*** hazmat has joined #zope3-dev10:30
*** `anthony has quit IRC10:47
*** `anthony has joined #zope3-dev11:00
*** mgedmin has joined #zope3-dev11:19
*** projekt01 has joined #zope3-dev11:19
projekt01mgedmin, did you see the removing of the LocationProxy out of the EditView?11:22
mgedminnot yet11:22
projekt01mgedmin, can you test the SchoolBell application?11:23
mgedminSchoolBell uses a frozen snapshot of Zope 3 at the moment11:24
mgedminI'll take a look at what's this LocationProxy stuff about, thanks for the heads-up11:25
projekt01Yup11:25
*** philiKON has joined #zope3-dev11:42
mgedminlate night hacking: http://mg.pov.lt/blog/zope3-request-recorder.html11:53
philiKONway cool11:55
mgedminI need to make it thread-safe and write some unit tests, then I can commit it into zope 3 if there's interest11:55
philiKONyes, a lot11:55
philiKONdoes it produce doctests already?11:55
mgedminyes11:55
mgedminit reuses zope.app.testing.dochttp11:56
mgedminyou click on the 'Create doctest' button and you get a file download window in your browser11:56
mgedminI need a global data structure that can be accessed (read & write) from multiple threads11:56
philiKONcool11:57
mgedminI suppose MappingStorage fits the bill best, as I'd also like to have transactions11:57
mgedminany examples in zope 3?11:57
mgedmindo sessions use something like that?11:57
philiKONyes, a zodb storage would probably be best11:58
philiKONmgedmin, sessions uses mappingstorage11:59
projekt01mgedmin, whow11:59
mgedminok, I see how RAMSessionDataContainer does this12:01
*** philiKON has quit IRC12:02
mgedminnext question: how do I allocate unique small numeric IDs from multiple threads without causing too many conflict errors?12:03
*** tarek_ is now known as tarek_away12:10
*** MalcolmC has joined #zope3-dev12:11
*** Aiste has joined #zope3-dev12:17
*** tarek__ has joined #zope3-dev13:42
*** tarek_away has quit IRC13:50
*** vlado has quit IRC14:06
*** __gotcha has joined #zope3-dev14:14
*** philiKON has joined #zope3-dev14:24
SteveAmgedmin: i don't understand14:33
*** srichter has quit IRC14:34
SteveAmgedmin: i'd suggest using a many-read-one-write lock on a module-level object.14:34
mgedminon every request I want to add an object to a container14:35
mgedminI would like the objects to have unique short IDs14:35
mgedminso that I can refer to them in web forms14:36
SteveAyou may want to write a container that is for appending only, and knows about conflict resolution14:36
SteveAand allocates its own ids14:36
mgedminah, good idea14:36
mgedminI've never written a persisten class that handled conflict resolution smartly14:37
mgedminpointers to examples would be welcome14:37
* SteveA runs and hides14:37
mgedminI would even accept links to documentation ;)14:41
SteveAthere are some interfaces in Persistent or ZODB somewhere14:45
*** alga has quit IRC14:49
*** niemeyer has joined #zope3-dev14:54
*** ignas_ has joined #zope3-dev14:59
*** mgedmin has quit IRC15:10
*** mkerrin has joined #zope3-dev15:23
*** viyyer has quit IRC15:38
*** vlado has joined #zope3-dev15:40
*** srichter has joined #zope3-dev15:43
*** ChanServ sets mode: +o srichter15:43
*** alga has joined #zope3-dev15:48
*** BjornT has joined #zope3-dev15:50
*** stub has quit IRC15:57
*** GaryPoster has joined #zope3-dev16:00
*** SteveA_ has joined #zope3-dev16:09
*** SteveA has quit IRC16:12
*** SureshZ has joined #zope3-dev16:14
*** ignas has quit IRC16:23
*** ignas_ is now known as ignas16:23
*** ignas_ has joined #zope3-dev16:23
*** philiKON has quit IRC16:27
*** J1m has joined #zope3-dev16:31
*** mgedmin has joined #zope3-dev16:36
mgedmin++skin++Boston is CSS-less for me16:39
mgedminI think the empty script tag confuses my Firefox16:39
mgedmin<script type="text/javascript" src="http://localhost:8080/++skin++Boston/@@/boston.js" />16:39
mgedminyes, changing /> to ></script> fixed it16:40
mgedminwow, nice16:40
mgedminprojekt01, kudos!16:42
mgedminthe online help window is a little bit too small -- horizontal scrollball appears whenever there is a code or zpt example16:43
mgedminthe whole skin feels somewhat windows-xp-ish, which is a minus to a hardcore linux geek like me, but never mind that16:44
mgedminwe can add themes later ;)16:44
*** benji_york has joined #zope3-dev16:47
projekt01mgedmin, Ok, thanks for bugfix the skin16:55
projekt01Hm, feel free to change the width in the online help16:57
*** hdima has quit IRC16:57
SteveA_J1m: a while ago, I asked you about having an attribute in the zcml page directive to say about a method to call on the view's class before rendering the template.17:03
SteveA_iirc, you had some more general idea about that, which needed some more thought17:03
J1mYes17:04
J1mI'll promise to get *something* out by the end of next week17:04
* mgedmin overrides view.__call__(), does whatever is necessary before rendering, then does 'return self.index()'17:04
J1mThat works.  I'd like to provide something easier and more general17:05
J1mIf possible17:05
SteveA_a pre-rendering subscriber? ;-)17:05
J1mFrankly, I don't have time to think about this right now.17:05
*** tvon has joined #zope3-dev17:06
J1mI'd be happy to schedule a brainstorming session some time if you'd like.17:06
SteveA_sure, when's good for you?17:15
*** tvon|x31 has joined #zope3-dev17:16
*** oferw has joined #zope3-dev17:33
*** tvon has quit IRC17:37
*** `anthony has quit IRC17:42
*** `anthony has joined #zope3-dev17:42
J1mHow about Friday morning (my time)17:46
*** htd has quit IRC17:46
SteveA_J1m: sure.  that works for me.17:47
J1mHow about 10am my time (4pm your time?)17:48
SteveA_what's the time for you right now?17:49
J1m10:49am17:49
SteveA_it is 17:49 here17:49
SteveA_so, 10am will be 5pm my time17:50
SteveA_works for me17:50
J1mah, cool17:50
J1mok17:50
*** alga has quit IRC17:57
*** vlado__ has joined #zope3-dev18:03
*** vlado has quit IRC18:09
*** sashav has joined #zope3-dev18:10
*** SureshZ has quit IRC18:12
*** SureshZ has joined #zope3-dev18:14
*** tvon has joined #zope3-dev18:25
*** bskahan has joined #zope3-dev18:32
*** SteveA__ has joined #zope3-dev18:33
*** SteveA__ has quit IRC18:34
*** SteveA has joined #zope3-dev18:35
*** tvon_ has joined #zope3-dev18:38
*** mgedmin has quit IRC18:39
*** tvon|x31 has quit IRC18:42
*** __gotcha has quit IRC18:46
*** SteveA_ has quit IRC18:57
*** tvon has quit IRC18:57
*** bradb has quit IRC19:03
*** mgedmin has joined #zope3-dev19:03
*** BjornT has quit IRC19:04
*** tvon_ is now known as tvon19:06
*** ChanServ sets mode: +o hazmat19:16
*** SteveA has quit IRC19:19
*** deo has joined #zope3-dev19:19
*** oferw has quit IRC19:25
*** SureshZ has quit IRC19:26
*** MalcolmC has quit IRC19:44
*** vlado__ has quit IRC20:01
*** sashav has quit IRC20:02
*** mkerrin has quit IRC20:06
*** Theuni has quit IRC20:07
*** Theuni has joined #zope3-dev20:11
*** SteveA has joined #zope3-dev20:15
*** gintas has joined #zope3-dev20:29
*** jdz_ has joined #zope3-dev20:36
*** bradb has joined #zope3-dev20:37
*** philiKON has joined #zope3-dev20:42
*** gintas has quit IRC20:47
*** hazmat has quit IRC20:57
*** hazmat has joined #zope3-dev21:20
* mgedmin wonders if apidoc can show him the interface inheritance tree of object copied/added/renamed/moved/whatevered events21:27
*** BjornT has joined #zope3-dev21:29
*** tvon has quit IRC21:35
*** alga has joined #zope3-dev21:42
*** hazmat has quit IRC21:57
*** tvon has joined #zope3-dev22:06
*** philiKON has quit IRC22:07
srichtermgedmin: what do you mean?22:08
srichterlike: IObjectEvent -> IEvent -> Interface?22:08
srichterI have thought about this before, but I had not been convinced of its usefullness22:09
mgedminI'm not sure what I mean22:12
mgedminI'd like to see at least to all interfaces that extend the one I'm looking at22:12
mgedminunless there are too many22:13
mgedminlike an interface lists all known classes that implementit22:14
mgedminor a class lists its known subclasses (it does, doesn't it?)22:14
srichterno, only th edirect ones22:24
srichterso it really does only the first level but not the tree22:25
srichtermgedmin: so I guess I should design this tree at some point, eh?22:26
*** hazmat has joined #zope3-dev22:26
mgedminfirst level would be enough22:29
mgedmintree and graphviz-generated diagrams are optional extras22:30
mgedmin;)22:30
*** bskahan has quit IRC22:32
srichterthe first level is already shown22:37
srichterso you can go to the event interface you are interested in and look at its bases22:37
srichterso you can go to IObjectModifiedEvent22:37
mgedminoh22:38
srichterand there you will see that one base is IObjectEvent22:38
mgedminI was looking at an older Zope 3 instance then22:38
srichteryou can click on that and you will see IEvent as base22:38
mgedminwait -- I want to go to IObjectEvent22:38
srichtermmh, that was in 3.0 already as far as I remember22:38
mgedminand see the first level of subinterfaces22:38
mgedminthat is, IObjectCreatedEvent, IObjectMovedEvent and IObjectModifiedEvent22:39
srichteroh, see you want to see a list of interfaces that extend IObjectEvent22:39
mgedminyes22:39
srichteroh ok, I have not done that yet, but it should not be that hard actually22:39
*** bskahan has joined #zope3-dev22:39
*** BjornT has quit IRC22:59
*** BjornT has joined #zope3-dev22:59
*** BjornT has quit IRC23:46
*** BjornT has joined #zope3-dev23:46
*** deo is now known as deo|food23:49

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