Acquisition

Software Screenshot:
Acquisition
Software Details:
Version: 4.2.2 updated
Upload Date: 4 Jun 15
Developer: Zope Corporation
Distribution Type: Freeware
Downloads: 15

Rating: 2.0/5 (Total Votes: 1)

Two styles of acquisition are supported: explicit and implicit acquisition.

Implicit acquisition is so named because it searches for attributes from the environment automatically whenever an attribute cannot be obtained directly from an object or through inheritance.

An attribute can be implicitly acquired if its name does not begin with an underscore.

To support implicit acquisition, your class should inherit from the mix-in class Acquisition.Implicit.

When explicit acquisition is used, attributes are not automatically obtained from the environment. Instead, the method aq_acquire must be used.

Acquisition is written in Python.

Acquisition provides a powerful way to dynamically share information between objects. Zope 2 uses acquisition for a number of its key features including security, object publishing, and DTML variable lookup.

Acquisition also provides an elegant solution to the problem of circular references for many classes of problems. While acquisition is powerful, you should take care when using acquisition in your applications.

The details can get complex, especially with the differences between acquiring from context and acquiring from containment.

What is new in this release:

  • Make the pure-Python Acquirer objects cooperatively use the superclass __getattribute__ method, like the C implementation.
  • The pure-Python implicit acquisition wrapper allows wrapped objects to use object.__getattribute__(self, name). This differs from the C implementation, but is important for compatibility with the pure-Python versions of libraries like persistent.

What is new in version 4.2.1:

  • Skip readme.rst tests when tests are run outside a source checkout.

What is new in version 4.2:

  • Skip readme.rst tests when tests are run outside a source checkout.

What is new in version 4.1:

  • Skip readme.rst tests when tests are run outside a source checkout.

What is new in version 4.0a1:

  • Raise RuntimeError: Recursion detected in acquisition wrapper if an object with a __parent__ pointer points to a wrapper that in turn points to the original object.
  • Prevent wrappers to be created while accessing __parent__ on types derived from Explicit or Implicit base classes.

What is new in version 2.13.8:

  • Fixed a segfault on 64bit platforms when providing the explicit argument to the aq_acquire method of an Acquisition wrapper.

What is new in version 2.13.7:

  • Fixed bug: When an object did not implement __unicode__, calling unicode(wrapped) was calling __str__ with an unwrapped self.

What is new in version 2.13.6:

  • Add aq_explicit to IAcquisitionWrapper.
  • Fixed bug: unicode(wrapped) was not calling a __unicode__ method on wrapped objects.

What is new in version 2.13.5:

  • Fixed unit tests that failed on 64bit Python on Windows machines.

What is new in version 2.13.4:

  • Fixed typo in Acquisition.h.

What is new in version 2.13.3:

  • Use the doctest module from the standard library and no longer depend on zope.testing.

What is new in version 2.13.2:

  • Give both wrapper classes a __getnewargs__ method, which causes the ZODB optimization to fail and create persistent references using the _p_oid alone. This happens to be the persistent oid of the wrapped object. This lets these objects to be persisted correctly, even though they are passed to the ZODB in a wrapped state.
  • Added failing tests for http://dev.plone.org/plone/ticket/10318. This shows an edge-case where AQ wrappers can be pickled using the specific combination of cPickle, pickle protocol one and a custom Pickler class with an inst_persistent_id hook. Unfortunately this is the exact combination used by ZODB3.

Similar Software

Erlang
Erlang

1 May 16

Lua
Lua

21 Jul 15

Python
Python

10 Feb 16

Gauche
Gauche

13 May 15

Other Software of Developer Zope Corporation

ZODB3
ZODB3

15 Apr 15

Zope
Zope

19 Jul 15

ZODB
ZODB

21 Jul 15

Comments to Acquisition

Comments not found
Add Comment
Turn on images!