Re: [Zope3-dev] wildcard adapter

2007-01-19 Thread Chris Withers
Marius Gedminas wrote: There's a slight difference, I think. In the Zope 3 world, there's usually one style that is considered to be the best way of doing stuff. Only it varies with time and with individual Zope 3 developers. ;-) I do wish it would stop varying... If you pass the

Re: [Zope3-dev] Re: wildcard adapter

2007-01-19 Thread Chris Withers
Marius Gedminas wrote: Now when you try to adapt anything to ITest, zope.component will call your ``adapter`` function and then check the return value. A return value of None means the adapter is not available, and results in a TypeError you see here: Yes, apologies, both you and Philipp are

[Zope3-dev] Re: zope.tal.xmlparser.XMLParser() dislikes unicode

2007-01-19 Thread Martijn Faassen
Andreas Jung wrote: I am replying to the three proposals. First I have to kick the proposal of Tres (UTF-8 storage). We want unicode as internal representation for any kind of ZPT (both text/html and text/xml). I'm not sure I understand this. Wouldn't the internal representation be unicode

[Zope3-dev] Re: wildcard adapter

2007-01-19 Thread Martijn Faassen
Marius Gedminas wrote: On Thu, Jan 18, 2007 at 08:55:17AM +, Chris Withers wrote: Marius Gedminas wrote: BTW passing interfaces to provideAdapter/adapts is out of fashion. This stuff is getting almost perl-ish in it's there's many ways to do it, pick the style you like nature.. There's

[Zope3-dev] [zope.testing] testbrowser/browser importing 'test' conflicts with Zope 2 testrunner

2007-01-19 Thread Andreas Jung
Hi, the Zope 2 testrunner has a problem with zope.testing: http://www.zope.org/Collectors/Zope/2268 testbrowser/browser.py tries a from test import pystone import it picks up the test.py of the Zope 2 testrunner that tries to re-add some configuration options to testrunner.setup causing the

Re: [Zope3-dev] [zope.testing] testbrowser/browser importing 'test' conflicts with Zope 2 testrunner

2007-01-19 Thread Benji York
Wouldn't that change just defer the error until that function is called? (which the testbrowser tests do) -- Benji York Senior Software Engineer Zope Corporation ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub:

Re: [Zope3-dev] [zope.testing] testbrowser/browser importing 'test' conflicts with Zope 2 testrunner

2007-01-19 Thread Andreas Jung
--On 19. Januar 2007 14:41:53 -0500 Benji York [EMAIL PROTECTED] wrote: Wouldn't that change just defer the error until that function is called? (which the testbrowser tests do) The patch solves my problem and the testbrowser tests pass. Andreas pgpivN2G5VcEl.pgp Description: PGP

Re: [Zope3-dev] [zope.testing] testbrowser/browser importing 'test' conflicts with Zope 2 testrunner

2007-01-19 Thread Benji York
Andreas Jung wrote: --On 19. Januar 2007 14:41:53 -0500 Benji York [EMAIL PROTECTED] wrote: Wouldn't that change just defer the error until that function is called? (which the testbrowser tests do) The patch solves my problem and the testbrowser tests pass. I suspect that means the tests

Re: [Zope3-dev] [zope.testing] testbrowser/browser importing 'test' conflicts with Zope 2 testrunner

2007-01-19 Thread Andreas Jung
--On 19. Januar 2007 15:08:49 -0500 Benji York [EMAIL PROTECTED] wrote: Andreas Jung wrote: --On 19. Januar 2007 14:41:53 -0500 Benji York [EMAIL PROTECTED] wrote: Wouldn't that change just defer the error until that function is called? (which the testbrowser tests do) The patch solves

[Zope3-dev] Re: wildcard adapter

2007-01-19 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris Withers wrote: Marius Gedminas wrote: Now when you try to adapt anything to ITest, zope.component will call your ``adapter`` function and then check the return value. A return value of None means the adapter is not available, and results in

[Zope3-dev] Re: wildcard adapter

2007-01-19 Thread Chris Withers
Tres Seaver wrote: provideAdapter(adapter,adapts=(None,None),provides=ITest) getMultiAdapter((1,1),ITest) Traceback (most recent call last): ... zope.component.interfaces.ComponentLookupError: ((1, 1), InterfaceClass __main__.ITest, u'') Oh dear, what have I done wrong here? The order