Re: [Zope-dev] z3c.recipe.i18n tests fail

2009-12-02 Thread yuppie
Christian Zagrodnick wrote: On 2009-12-01 16:36:50 +0100, yuppie y.2...@wcm-solutions.de said: Christian Zagrodnick wrote: AttributeError: 'NoneType' object has no attribute 'location' Should be fixed now. Yuppie Thanks! And it was such an easy fix! :) Well. Actually I didn't test with a

[Zope-dev] Zope Tests: 6 OK

2009-12-02 Thread Zope Tests Summarizer
Summary of messages to the zope-tests list. Period Tue Dec 1 12:00:00 2009 UTC to Wed Dec 2 12:00:00 2009 UTC. There were 6 messages: 6 from Zope Tests. Tests passed OK --- Subject: OK : Zope-2.10 Python-2.4.6 : Linux From: Zope Tests Date: Tue Dec 1 20:38:19 EST 2009 URL:

Re: [Zope-dev] implementing zope.component 4.0

2009-12-02 Thread Fred Drake
On Wed, Dec 2, 2009 at 2:21 AM, Thomas Lotze t...@gocept.com wrote: To be honest, I just don't see why this whole singleton business shouldn't be orthogonal to the concepts of the component architecture. Well said. If an application cares about singleton creation or ownership of

Re: [Zope-dev] implementing zope.component 4.0

2009-12-02 Thread Gary Poster
On Dec 2, 2009, at 8:33 AM, Fred Drake wrote: On Wed, Dec 2, 2009 at 2:21 AM, Thomas Lotze t...@gocept.com wrote: To be honest, I just don't see why this whole singleton business shouldn't be orthogonal to the concepts of the component architecture. Well said. If an application cares

Re: [Zope-dev] implementing zope.component 4.0

2009-12-02 Thread Thomas Lotze
Gary Poster wrote: On Dec 2, 2009, at 8:33 AM, Fred Drake wrote: On Wed, Dec 2, 2009 at 2:21 AM, Thomas Lotze t...@gocept.com wrote: To be honest, I just don't see why this whole singleton business shouldn't be orthogonal to the concepts of the component architecture. Well said. If an

Re: [Zope-dev] implementing zope.component 4.0

2009-12-02 Thread Fred Drake
On Wed, Dec 2, 2009 at 8:42 AM, Gary Poster gary.pos...@gmail.com wrote: You are arguing for the unification of utilities and adapters? No. I'm arguing not to conflate utilities with the singleton pattern or adaptation with ownership of the resulting adaptation. -Fred -- Fred L. Drake,

Re: [Zope-dev] implementing zope.component 4.0

2009-12-02 Thread Thomas Lotze
Martijn Faassen wrote: * a utility never has a connection. That's because it already got instantiated long before the lookup takes place. Isn't it the other way around: A utility never has a connection to any adapted object, and that's *why we can* instantiate it long before the lookup takes

Re: [Zope-dev] implementing zope.component 4.0

2009-12-02 Thread Chris McDonough
Thomas Lotze wrote: Martijn Faassen wrote: * a utility never has a connection. That's because it already got instantiated long before the lookup takes place. Isn't it the other way around: A utility never has a connection to any adapted object, and that's *why we can* instantiate it long

Re: [Zope-dev] implementing zope.component 4.0

2009-12-02 Thread Gary Poster
On Dec 2, 2009, at 8:58 AM, Fred Drake wrote: On Wed, Dec 2, 2009 at 8:42 AM, Gary Poster gary.pos...@gmail.com wrote: You are arguing for the unification of utilities and adapters? No. I'm arguing not to conflate utilities with the singleton pattern or adaptation with ownership of the

Re: [Zope-dev] implementing zope.component 4.0

2009-12-02 Thread Thomas Lotze
Gary Poster wrote: Without this distinction, AFAICT either you want to conflate the ideas, or you have a concept of the differences between the two that is more esoteric than I think is useful. I get the impression that it is on the second point of those that we disagree. Right, I

Re: [Zope-dev] implementing zope.component 4.0

2009-12-02 Thread Lennart Regebro
Unifying adapters and utilities gets us nowhere. If we remove the distinction between an adapter and a utility we are simply left with the concept of component. Then we have components, nothing else. Components are objects registered base on what interface they implement, and can be looked up

Re: [Zope-dev] implementing zope.component 4.0

2009-12-02 Thread Stephan Richter
On Wednesday 02 December 2009, Lennart Regebro wrote: When there is such a clear and distinct conceptual difference between adapters and utilities, why would we try to murk that distinction by pretending that non adapters are a special case of adapters, when it's obvious that that's exactly

Re: [Zope-dev] implementing zope.component 4.0

2009-12-02 Thread Martin Aspeli
Chris McDonough wrote: Thomas Lotze wrote: Martijn Faassen wrote: * a utility never has a connection. That's because it already got instantiated long before the lookup takes place. Isn't it the other way around: A utility never has a connection to any adapted object, and that's *why we can*

[Zope-dev] zope.testing.testrunner.debug.post_mortem and try/finally

2009-12-02 Thread Ross Patterson
When a try/finally clause is (appropriately) used to do cleanup after an exception during a test run, it often tears down parts of the fixture that are needed in order to do useful post_mortem debugging of the exception, such as closing the request or db connections. What is the best way to do

Re: [Zope-dev] zope.testing.testrunner.debug.post_mortem and try/finally

2009-12-02 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ross Patterson wrote: When a try/finally clause is (appropriately) used to do cleanup after an exception during a test run, it often tears down parts of the fixture that are needed in order to do useful post_mortem debugging of the exception, such

Re: [Zope-dev] zope.testing.testrunner.debug.post_mortem and try/finally

2009-12-02 Thread Ross Patterson
Tres Seaver tsea...@palladion.com writes: Ross Patterson wrote: When a try/finally clause is (appropriately) used to do cleanup after an exception during a test run, it often tears down parts of the fixture that are needed in order to do useful post_mortem debugging of the exception, such as

Re: [Zope-dev] zope.testing.testrunner.debug.post_mortem and try/finally

2009-12-02 Thread Marius Gedminas
On Wed, Dec 02, 2009 at 09:08:51AM -0800, Ross Patterson wrote: When a try/finally clause is (appropriately) used to do cleanup after an exception during a test run, it often tears down parts of the fixture that are needed in order to do useful post_mortem debugging of the exception, such as

Re: [Zope-dev] zope.testing.testrunner.debug.post_mortem and try/finally

2009-12-02 Thread Benji York
On Wed, Dec 2, 2009 at 1:22 PM, Ross Patterson m...@rpatterson.net wrote: I'm sorry, I was unclear, the try/finally clauses are not necessarily in *test tearDown* methods (though I used that language), they are often a part of the application being tested, such as closing the request, closing

Re: [Zope-dev] zope.testing.testrunner.debug.post_mortem and try/finally

2009-12-02 Thread Ross Patterson
Benji York be...@zope.com writes: On Wed, Dec 2, 2009 at 1:22 PM, Ross Patterson m...@rpatterson.net wrote: I'm sorry, I was unclear, the try/finally clauses are not necessarily in *test tearDown* methods (though I used that language), they are often a part of the application being tested,

Re: [Zope-dev] zope.testing.testrunner.debug.post_mortem and try/finally

2009-12-02 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ross Patterson wrote: Tres Seaver tsea...@palladion.com writes: Are you using try:...finally:... inside your testcase methods? If so, why not just move the cleanup invocation into your 'tearDown' for the testcase class: at that point, the '-D'

Re: [Zope-dev] zope.testing.testrunner.debug.post_mortem and try/finally

2009-12-02 Thread Marius Gedminas
On Wed, Dec 02, 2009 at 01:36:37PM -0500, Benji York wrote: Here's another idea: a testrunner option that takes a file name and line number and inserts a breakpoint at that position. That way you can get the same effect as editing the code without actually having to do so. Is that possible?

Re: [Zope-dev] zope.testing.testrunner.debug.post_mortem and try/finally

2009-12-02 Thread Benji York
On Wed, Dec 2, 2009 at 5:06 PM, Marius Gedminas mar...@gedmin.as wrote: On Wed, Dec 02, 2009 at 01:36:37PM -0500, Benji York wrote: Here's another idea: a testrunner option that takes a file name and line number and inserts a breakpoint at that position.  That way you can get the same effect

Re: [Zope-dev] Releasing zope.browserresource

2009-12-02 Thread Benji York
On Thu, Nov 26, 2009 at 4:57 AM, Wichert Akkerman wich...@wiggy.net wrote: On 2009-11-26 08:43, Michael Howitz wrote: Am 25.11.2009 um 15:49 schrieb Chris Withers: [...] Yes, PyPI is broken if you're an admin of many packages, feel free to me too on this issue:

[Zope-dev] ZCA summary so far...

2009-12-02 Thread Gary Poster
...from my perspective. = Things vaguely approaching consensus = == General == There's a consensus that changes to the ZCA need to be backwards compatible. The practical definition of that varies for different people. == Syntactic == === Tuple multi-adaptation === Example: IFoo((bar,

[Zope-dev] ZCA proposal

2009-12-02 Thread Gary Poster
I think I could get fully behind the following proposal that others have made (Shane I think was one of several?). IFoo.adapt(...) IFoo.utility(...) = Why? = - This is a significant improvement in terms of being memorable, as far as I'm concerned. It's also briefer, which is related. - It

Re: [Zope-dev] ZCA proposal

2009-12-02 Thread Martin Aspeli
Gary Poster wrote: I think I could get fully behind the following proposal that others have made (Shane I think was one of several?). IFoo.adapt(...) IFoo.utility(...) I could get behind this too. We'd need the current IFoo(context, default) for single adaptation to continue to work,

Re: [Zope-dev] ZCA proposal

2009-12-02 Thread Gary Poster
On Dec 2, 2009, at 11:09 PM, Martin Aspeli wrote: Gary Poster wrote: I think I could get fully behind the following proposal that others have made (Shane I think was one of several?). IFoo.adapt(...) IFoo.utility(...) I could get behind this too. We'd need the current

Re: [Zope-dev] ZCA proposal

2009-12-02 Thread Martin Aspeli
Gary Poster wrote: On Dec 2, 2009, at 11:09 PM, Martin Aspeli wrote: Gary Poster wrote: I think I could get fully behind the following proposal that others have made (Shane I think was one of several?). IFoo.adapt(...) IFoo.utility(...) I could get behind this too. We'd need the

Re: [Zope-dev] ZCA proposal

2009-12-02 Thread Martin Aspeli
Gary Poster wrote: I think I could get fully behind the following proposal that others have made (Shane I think was one of several?). IFoo.adapt(...) IFoo.utility(...) Thinking about it a bit, it strikes me that IFoo.adapt(context) may not be right. This reads IFoo adapt context, which

Re: [Zope-dev] improving the utility and adapter lookup APIs

2009-12-02 Thread Christian Theune
On 11/30/2009 10:05 AM, Brian Sutherland wrote: On Wed, Nov 25, 2009 at 10:17:41PM +0100, Hanno Schlichting wrote: On Wed, Nov 25, 2009 at 9:52 PM, Tres Seavertsea...@palladion.com wrote: Hmm, I may be missing something here, but if Foo implements IFoo, then the getAdapter lookup for it will

Re: [Zope-dev] zope.testing.testrunner.debug.post_mortem and try/finally

2009-12-02 Thread Wichert Akkerman
On 2009-12-2 23:06, Marius Gedminas wrote: On Wed, Dec 02, 2009 at 01:36:37PM -0500, Benji York wrote: Here's another idea: a testrunner option that takes a file name and line number and inserts a breakpoint at that position. That way you can get the same effect as editing the code without