Re: [Zope-dev] Turning acquisition off selectively.
Toby Dickenson wrote: > > On Fri, 08 Dec 2000 10:57:48 -0500, Jim Fulton <[EMAIL PROTECTED]> > wrote: > > >I'm inclined to think that in some future version of Zope, we > >should switch to making explicit acquisition the norm. > > Jim, do you have any opinions on some of the other acquisition > strategies that have been mentioned on the list? I don't have time to read the list normally. :( (This is bad. I need to fix this and am trying to ) > In particular, there seems to be merit in an acquisition that searches > only the containment heirarchy. Of course. Zope already doesn this for security. It does this by brute force most of the time, although there's now more API support for it. There's a 'containment' keyword flag argument to the aq_acquire method, so, at least from Python, you can force acquisition to search *only* the containment hierarchy. I think that there's merit to providing more control over how acquisition happens. This is consistent with making acquisition more explicit. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! Technical Director (888) 344-4332http://www.python.org Digital Creationshttp://www.digicool.com http://www.zope.org ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Turning acquisition off selectively.
On Fri, 08 Dec 2000 10:57:48 -0500, Jim Fulton <[EMAIL PROTECTED]> wrote: >I'm inclined to think that in some future version of Zope, we >should switch to making explicit acquisition the norm. Jim, do you have any opinions on some of the other acquisition strategies that have been mentioned on the list? In particular, there seems to be merit in an acquisition that searches only the containment heirarchy. Toby Dickenson [EMAIL PROTECTED] ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Turning acquisition off selectively.
Surely you jest ? I may be out of line, I am quite new to Zope and have only made a few python products, but the nice thing I felt Acquisition.Implicit gave was a sense of being able to put a method into an environment and let it "discover" what was around it. Aquisition.Explicit I thought was where you knew specific things about your environment and wanted them from there instead of what you had brought along yourself. Matt On Sat, 09 Dec 2000, Jim Fulton wrote: > Chris Withers wrote: > > > > [EMAIL PROTECTED] wrote: > > > > > > That is, with a simple method, and not disabling the Acqusition class, > > > something like self.aq_disabled('attribute') . > > > > So kindof the inverse of using Aquisition.Explicit and using the > > aq_acquire method? > > > > What you describe would be really cool... > > > > The only workaround for now is to use calls to ac_acquire() and provide > > a filter function, but this doesn't help when other code that you have > > no control over accesses an attribute that you'd rather not have > > acquired :-( > > I'm inclined to think that in some future version of Zope, we > should switch to making explicit acquisition the norm. > > Jim > > -- > Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! > Technical Director (888) 344-4332http://www.python.org > Digital Creationshttp://www.digicool.com http://www.zope.org > > ___ > Zope-Dev maillist - [EMAIL PROTECTED] > http://lists.zope.org/mailman/listinfo/zope-dev > ** No cross posts or HTML encoding! ** > (Related lists - > http://lists.zope.org/mailman/listinfo/zope-announce > http://lists.zope.org/mailman/listinfo/zope ) -- Matt Halstead (PhD) Research and development VirtualSpectator http://www.virtualspectator.com ph 64-9-9136896 ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Turning acquisition off selectively.
Chris Withers wrote: > > [EMAIL PROTECTED] wrote: > > > > That is, with a simple method, and not disabling the Acqusition class, > > something like self.aq_disabled('attribute') . > > So kindof the inverse of using Aquisition.Explicit and using the > aq_acquire method? > > What you describe would be really cool... > > The only workaround for now is to use calls to ac_acquire() and provide > a filter function, but this doesn't help when other code that you have > no control over accesses an attribute that you'd rather not have > acquired :-( I'm inclined to think that in some future version of Zope, we should switch to making explicit acquisition the norm. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! Technical Director (888) 344-4332http://www.python.org Digital Creationshttp://www.digicool.com http://www.zope.org ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Turning acquisition off selectively.
I'm almost beginning to understand Acquisition. I can see that it's possible to control the things that my class acquires ie import or ancestor acquisition control, but is it possible to control what other classes acquire from me sort of export/descendant control. -- Robin Becker ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Turning acquisition off selectively.
[EMAIL PROTECTED] wrote: > > That is, with a simple method, and not disabling the Acqusition class, > something like self.aq_disabled('attribute') . So kindof the inverse of using Aquisition.Explicit and using the aq_acquire method? What you describe would be really cool... The only workaround for now is to use calls to ac_acquire() and provide a filter function, but this doesn't help when other code that you have no control over accesses an attribute that you'd rather not have acquired :-( cheers, Chris PS: http://www.zope.org/Members/michel/Projects/Interfaces/AcquisitionWrappedObject ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )