[Zope-dev] zope.component: calling an Interface and calling queryAdapter give differing results

Tres Seaver tseaver at palladion.com
Tue Sep 30 10:56:38 EDT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris Withers wrote:
> Brandon Craig Rhodes wrote:
>> I'm encouraged by the fact that this time it looks like people with time
>> are interested enough to actually begin producing code?  At the time
>> that I made the 2007 proposal I was still very new to the code base and
>> never got the courage up (or time available) to start making changes...
> 
> The changes we're talking about are only really syntactic sugar so not 
> really that scary.
> 
> I'm left wondering where to put the tests, since while I know 
> zope.component relies on zope.interface, is the reverse true?
> 
> I guess it must be, since calling an interface already does some adaptation.

No, there is no dependency:  zope.interface defines a hook point that
zope.component uses.  In the absence of zope.component, zope.interface
uses a default implementation.

> Can anyone else confirm this and give me a hint as to where the tests 
> and code should go?

Tests likely belong in 'zope.interface.tests.test_adapter'.



Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI4j4l+gerLs4ltQ4RAiiEAJ0Vp4RP1HeEdwu7YUyaY+Vsa6DAjwCdGeuO
eHQbGlp8geoKGPoC4IKniYc=
=amZR
-----END PGP SIGNATURE-----



More information about the Zope-Dev mailing list