Re: [Zope3-Users] Adapting a builtin?

2005-12-13 Thread Paul Winkler
On Tue, Dec 13, 2005 at 07:57:38AM +0100, Michael Howitz wrote: > In unittests the ZCML-Directives are not used so you have to do the > things from ZCML in your test-code before adaption. > > from zope.interface import classImplements > from zope.app.testing import ztapi > > classImplements(str,

Re: [Zope3-Users] Adapting a builtin?

2005-12-12 Thread Michael Howitz
On Mon, 2005-12-12 at 18:06 -0500, Paul Winkler wrote: [...] > # toward the end of > # tests/testtests/test_AcceleratedHTTPCacheManager.py # > > def test_XXXinterface(self): > url = 'http://www.google.com' > from Products.StandardCacheManagers.interfaces

Re: [Zope3-Users] Adapting a builtin?

2005-12-12 Thread Paul Winkler
On Wed, Dec 07, 2005 at 10:23:14AM -0500, Jim Fulton wrote: > It is valid both to: > > - Declare an interface for a built-in type and > register adapters for that interface, and to > > - Register adapters for builtin types directly. > > I can't promise that this works now, but it ought to work

Re: [Zope3-Users] Adapting a builtin?

2005-12-08 Thread Jim Fulton
Martijn Faassen wrote: Jim Fulton wrote: It is valid both to: - Declare an interface for a built-in type and register adapters for that interface, and to - Register adapters for builtin types directly. I can't promise that this works now, but it ought to work. I'm 90% sure that it does in

Re: [Zope3-Users] Adapting a builtin?

2005-12-08 Thread Martijn Faassen
Jim Fulton wrote: It is valid both to: - Declare an interface for a built-in type and register adapters for that interface, and to - Register adapters for builtin types directly. I can't promise that this works now, but it ought to work. I'm 90% sure that it does in fact work, at least in Zo

Re: [Zope3-Users] Adapting a builtin?

2005-12-07 Thread Jim Fulton
riginal Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Howitz Sent: Wednesday, December 07, 2005 8:59 AM To: Paul Winkler Cc: zope3-users@zope.org Subject: Re: [Zope3-Users] Adapting a builtin? On Tue, 2005-12-06 at 18:44 -0500, Paul Winkler wrote: Hi, Is i

RE: [Zope3-Users] Adapting a builtin?

2005-12-07 Thread Roger Ineichen
rom: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Michael Howitz > Sent: Wednesday, December 07, 2005 8:59 AM > To: Paul Winkler > Cc: zope3-users@zope.org > Subject: Re: [Zope3-Users] Adapting a builtin? > > On Tue, 2005-12-06 at 18:44 -0500, Paul Winkler wrote: &

Re: [Zope3-Users] Adapting a builtin?

2005-12-06 Thread Michael Howitz
On Tue, 2005-12-06 at 18:44 -0500, Paul Winkler wrote: > Hi, > > Is it possible to register an adapter for a builtin type > such as str? All the adapter examples I see use an interface for the > "for" attribute. > > Something like: > >provides=".interfaces.IHTTPConnection" > factory