[Zope-Checkins] CVS: Zope2 - Acquisition.c:1.37
Tue, 14 Mar 2000 12:59:08 -0500
Update of /cvs-repository/Zope2/lib/Components/ExtensionClass
In directory korak.digicool.com:/tmp/cvs-serv4562
Hold on to your butts. ;)
Major restructuring to fix a number of bugs:
- Methods (retrieved as attributes) were sometimes not
bound to objects in the right context. This could cause
acquisition to fail within the methods.
- An optimization skipped calling the __of__ method, assuming that
it was skipping the standard acquistion __of__ method. This could
cause application __of__ methods to get skipped. Now the __of__
method is never skipped. The return value is inspected to
see if it can be simplified. In the future we might be willing
to skip calling __of__ if we *know* that we are skipping a known
- The special value, Acquired, used to force acquisition
was not handled correctly when it was acquired from a container.
- Some error handling was not done quite correctly. I don't know
if this caused any problems.
- Nested explicit acquisition wrappers may not have been handled
correctly when accessed through attribute access of a containing
Reduced code by sending all searches through the same routine,
Added two new features:
- You can now assign the aq_parent attribute of a wrapper.
This is deemed to be useful in certain applications, including
- The method aq_acquire hysterically has two usages:
o To explicitly acquire from an Explicit acquirer wrapper.
o To apply a filter to guide the search process (e.g. for security).
Sometimes, someone might want to apply a filter without forcing
explict acquisition. An additional optional argument was added
to allow use of a filter without forcing explicit acquisition.