"providedBy/Acquisition" bug: acquisition wrappers do not provide "IAcquisitionWrapper"

Bug #251040 reported by Dieter Maurer
2
Affects Status Importance Assigned to Milestone
Acquisition
Invalid
Wishlist
Unassigned

Bug Description

One would expect that (without special measures) an instance "i" of
a type "t" provides interface "I", if "t" implements it.

This is not the case for acquisition wrappers:

((Pdb)) p type(n_object)
<type 'ImplicitAcquirerWrapper'>
((Pdb)) p IAcquisitionWrapper.providedBy(n_object)
False
((Pdb)) p IAcquisitionWrapper.implementedBy(type(n_object))
True

Im am not sure whether this is a bug in "providedBy" or in
"Acquisition". Therefore, I report it here (being sure, that Jim reads these
bug reports).

Revision history for this message
Dan Korostelev (nadako) wrote :

Acquisition is part of zope2, so redirecting report there.

affects: zope2 → acquisition
Changed in acquisition:
status: New → Confirmed
Revision history for this message
Tres Seaver (tseaver) wrote :

Fixing this would interfere with the goal that acquisition wrappers are as transparent as possible: they only add a handful of attributes (in the 'aq_' namespace) to the underlying 'self' instance.

I guess we could add an implementation for '__provides__' which tacked 'IAcquisitionWrapper' onto any interfaces provided by the 'self' (but I'm not signing up for it).

Changed in acquisition:
importance: Undecided → Wishlist
Changed in acquisition:
status: Confirmed → Invalid
status: Invalid → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

The acquisition project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/acquisition.

Changed in acquisition:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.