[Zope-dev] zope-tests - FAILED: 8, OK: 52

2011-06-13 Thread Zope tests summarizer
This is the summary for test reports received on the zope-tests list between 2011-06-12 00:00:00 UTC and 2011-06-13 00:00:00 UTC: See the footnotes for test reports of unsuccessful builds. An up-to date view of the builders is also available in our buildbot documentation: http://docs.zope.org/

Re: [Zope-dev] component registry navelgazing

2011-06-13 Thread Jim Fulton
On Mon, Jun 13, 2011 at 12:38 PM, Jim Fulton wrote: > On Sun, Jun 12, 2011 at 4:48 PM, Chris McDonough wrote: >> Currently if you ask a registry to singly-adapt an object to an >> interface, and the object you're trying to adapt implements that >> interface, here's what happens: >> > from zop

Re: [Zope-dev] component registry navelgazing

2011-06-13 Thread Jim Fulton
On Sun, Jun 12, 2011 at 4:48 PM, Chris McDonough wrote: > Currently if you ask a registry to singly-adapt an object to an > interface, and the object you're trying to adapt implements that > interface, here's what happens: > from zope.component.registry import Components c = Components()

Re: [Zope-dev] component registry navelgazing

2011-06-13 Thread Charlie Clark
Am 13.06.2011, 17:01 Uhr, schrieb Chris Withers : > I have something, I want something that implements IWhatever. > Now, it may well be that something implements IWhatever, but it may > also not. As the author of the code in question, I don't want to have to > care. > Other authors can plug

Re: [Zope-dev] component registry navelgazing

2011-06-13 Thread Chris Withers
On 13/06/2011 15:26, Charlie Clark wrote: >> In order to get the object itself back from such an adaptation, you need >> to use the default= argument. > > I know that the question has been answered but your question makes me ask > another: why would you want to adapt an object with itself? I have

Re: [Zope-dev] component registry navelgazing

2011-06-13 Thread Georges Racinet
Stepping in… and +1 for the original question On 06/13/2011 04:26 PM, Charlie Clark wrote: > I know that the question has been answered but your question makes me ask > another: why would you want to adapt an object with itself? The sake of logical consistency should be enough. If you think of

Re: [Zope-dev] component registry navelgazing

2011-06-13 Thread Charlie Clark
Hiya, Am 12.06.2011, 22:48 Uhr, schrieb Chris McDonough : from zope.component.registry import Components c = Components() from zope.interface import Interface, implements class IFoo(Interface): pass > ... class Foo(object): > ... implements(IFoo) > ... foo = Foo(

Re: [Zope-dev] zope-tests - FAILED: 12, OK: 53

2011-06-13 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/13/2011 01:00 AM, Zope tests summarizer wrote: > [5]FAILED Zope 3.4 Known Good Set / py2.4-32bit-linux >https://mail.zope.org/pipermail/zope-tests/2011-June/043168.html This fails (wihtout much other information) trying to download

Re: [Zope-dev] component registry navelgazing

2011-06-13 Thread Chris McDonough
On Mon, 2011-06-13 at 10:08 +0100, Chris Withers wrote: > On 12/06/2011 21:48, Chris McDonough wrote: > > Currently if you ask a registry to singly-adapt an object to an > > interface, and the object you're trying to adapt implements that > > interface, here's what happens: > > > from zope.com

Re: [Zope-dev] component registry navelgazing

2011-06-13 Thread Chris Withers
On 12/06/2011 21:48, Chris McDonough wrote: > Currently if you ask a registry to singly-adapt an object to an > interface, and the object you're trying to adapt implements that > interface, here's what happens: > from zope.component.registry import Components c = Components() from zo

Re: [Zope-dev] component registry navelgazing

2011-06-13 Thread Fabio Tranchitella
* 2011-06-12 22:49, Chris McDonough wrote: > This seems slightly inconsistent with the adaptation worldview imposed by > getAdapter/queryAdapter. I think it would be more consistent if > "c.queryAdapter(IFoo, foo)" returned foo if foo already implemented IFoo > and there was no other more specific