Re: [Zope-dev] Non-ZCML config for ZCA. (Was: Anyone want to do Google Summer of code mentoring for PSF?)

2011-03-22 Thread Martijn Faassen
Hi there, It is my understanding that the ZTK is primarily to adopt proven solutions that arise from our community that we intend to be shared by this community. I'll also note that Martian is already in use in combination with Bluebream, Zope 2 and Grok. With that, I was thinking, concerning

Re: [Zope-dev] Non-ZCML config for ZCA. (Was: Anyone want to do Google Summer of code mentoring for PSF?)

2011-03-22 Thread Charlie Clark
Am 21.03.2011, 20:33 Uhr, schrieb Tres Seaver : > FWIW, I just added 'queryAdapterFactory' and 'queryMultiAdapterFactory' > APIs to zope.component on a branch: > http://svn.zope.org/zope.component/branches/tseaver-queryAdapterFactory/ > These APIs make the "almost never overridden" / dependency

Re: [Zope-dev] Non-ZCML config for ZCA. (Was: Anyone want to do Google Summer of code mentoring for PSF?)

2011-03-21 Thread Stephan Richter
On Monday, March 21, 2011, Tres Seaver wrote: > FWIW, I just added 'queryAdapterFactory' and 'queryMultiAdapterFactory' > APIs to zope.component on a branch: > > http://svn.zope.org/zope.component/branches/tseaver-queryAdapterFactory/ Looks good to me. Incidentally, I was just needing this toda

Re: [Zope-dev] Non-ZCML config for ZCA. (Was: Anyone want to do Google Summer of code mentoring for PSF?)

2011-03-21 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/21/2011 02:13 PM, Jim Fulton wrote: > On Mon, Mar 21, 2011 at 12:59 PM, Chris McDonough wrote: >> On Mon, 2011-03-21 at 15:53 +0100, Lennart Regebro wrote: > ... >>> It's easy and clear, but has the drawback of encouraging that >>> registration

Re: [Zope-dev] Non-ZCML config for ZCA. (Was: Anyone want to do Google Summer of code mentoring for PSF?)

2011-03-21 Thread Chris McDonough
On Mon, 2011-03-21 at 14:13 -0400, Jim Fulton wrote: > On Mon, Mar 21, 2011 at 12:59 PM, Chris McDonough wrote: > > On Mon, 2011-03-21 at 15:53 +0100, Lennart Regebro wrote: > ... > >> It's easy and clear, but has the drawback of encouraging that > >> registration is done on import time, while sca

Re: [Zope-dev] Non-ZCML config for ZCA. (Was: Anyone want to do Google Summer of code mentoring for PSF?)

2011-03-21 Thread Jim Fulton
On Mon, Mar 21, 2011 at 12:59 PM, Chris McDonough wrote: > On Mon, 2011-03-21 at 15:53 +0100, Lennart Regebro wrote: ... >> It's easy and clear, but has the drawback of encouraging that >> registration is done on import time, while scanning separates the >> registration from the definition. I'm no

Re: [Zope-dev] Non-ZCML config for ZCA. (Was: Anyone want to do Google Summer of code mentoring for PSF?)

2011-03-21 Thread Shane Hathaway
On 03/21/2011 10:59 AM, Chris McDonough wrote: > On Mon, 2011-03-21 at 15:53 +0100, Lennart Regebro wrote: >> It's easy and clear, but has the drawback of encouraging that >> registration is done on import time, while scanning separates the >> registration from the definition. I'm not sure how impo

Re: [Zope-dev] Non-ZCML config for ZCA. (Was: Anyone want to do Google Summer of code mentoring for PSF?)

2011-03-21 Thread Chris McDonough
On Mon, 2011-03-21 at 15:53 +0100, Lennart Regebro wrote: > On Mon, Mar 21, 2011 at 15:28, Jim Fulton wrote: > > This might be OK for @implements and maybe @adapts, which describe > > behavior, but start feeling wonky to me for something like: @utility. > > Well, the wonkyness comes from @utility

Re: [Zope-dev] Non-ZCML config for ZCA. (Was: Anyone want to do Google Summer of code mentoring for PSF?)

2011-03-21 Thread Martijn Faassen
On 03/21/2011 04:08 PM, Jim Fulton wrote: > On Mon, Mar 21, 2011 at 10:38 AM, Martijn Faassen > wrote: >> On 03/21/2011 03:28 PM, Jim Fulton wrote: >>> I don't know what the right answer is ... at least not yet. :) >> >> In Django and sqlalchemy declarative a meta class is used for this kind >> o

Re: [Zope-dev] Non-ZCML config for ZCA. (Was: Anyone want to do Google Summer of code mentoring for PSF?)

2011-03-21 Thread Jim Fulton
On Mon, Mar 21, 2011 at 10:38 AM, Martijn Faassen wrote: > On 03/21/2011 03:28 PM, Jim Fulton wrote: >> I don't know what the right answer is ... at least not yet. :) > > In Django and sqlalchemy declarative a meta class is used for this kind > of configuration. Since that is subclassing, it impli

Re: [Zope-dev] Non-ZCML config for ZCA. (Was: Anyone want to do Google Summer of code mentoring for PSF?)

2011-03-21 Thread Lennart Regebro
On Mon, Mar 21, 2011 at 15:28, Jim Fulton wrote: > This might be OK for @implements and maybe @adapts, which describe > behavior, but start feeling wonky to me for something like: @utility. Well, the wonkyness comes from @utility *not* being inherited, while @implements would be. That could be co

Re: [Zope-dev] Non-ZCML config for ZCA. (Was: Anyone want to do Google Summer of code mentoring for PSF?)

2011-03-21 Thread Martijn Faassen
On 03/21/2011 03:28 PM, Jim Fulton wrote: > I don't know what the right answer is ... at least not yet. :) In Django and sqlalchemy declarative a meta class is used for this kind of configuration. Since that is subclassing, it implies inheritance, I think. Of course metaclasses are not very goo

Re: [Zope-dev] Non-ZCML config for ZCA. (Was: Anyone want to do Google Summer of code mentoring for PSF?)

2011-03-21 Thread Martijn Faassen
On 03/21/2011 03:07 PM, Lennart Regebro wrote: > On Mon, Mar 21, 2011 at 14:17, Martijn Faassen wrote: >> Anyway, Grok's configuration is dependent on the rules you give it, so >> it's possible to have a completely explicit set of directives with no >> implicit fallback to default values whatsoeve

Re: [Zope-dev] Non-ZCML config for ZCA. (Was: Anyone want to do Google Summer of code mentoring for PSF?)

2011-03-21 Thread Jim Fulton
On Mon, Mar 21, 2011 at 10:07 AM, Lennart Regebro wrote: > On Mon, Mar 21, 2011 at 14:17, Martijn Faassen wrote: ... > With martian, the registration is then done by the grokking process, > but I think decorators would be a process that is more acceptable to > the Python world in general. Instanc

Re: [Zope-dev] Non-ZCML config for ZCA. (Was: Anyone want to do Google Summer of code mentoring for PSF?)

2011-03-21 Thread Lennart Regebro
On Mon, Mar 21, 2011 at 14:17, Martijn Faassen wrote: > Anyway, Grok's configuration is dependent on the rules you give it, so > it's possible to have a completely explicit set of directives with no > implicit fallback to default values whatsoever. Martian supports that > scenario right now. Sure

Re: [Zope-dev] Non-ZCML config for ZCA. (Was: Anyone want to do Google Summer of code mentoring for PSF?)

2011-03-21 Thread Martijn Faassen
Hi there, For Martian, Python 3 support is mostly an issue of making class directives work as class decorators. I'm not sure what Lennart means by point 1. Anyway, Grok's configuration is dependent on the rules you give it, so it's possible to have a completely explicit set of directives with

Re: [Zope-dev] Non-ZCML config for ZCA. (Was: Anyone want to do Google Summer of code mentoring for PSF?)

2011-03-21 Thread Jim Fulton
On Mon, Mar 21, 2011 at 7:47 AM, Lennart Regebro wrote: ... > 4. zope.interface already does, and zope.component will as well, once > it's ported. That means we get things like: > > class IMyFace(Interface): >    whatevah > > class IMyFeet(Interface): >    something > > @implementer(IMyFace) > cla

Re: [Zope-dev] Non-ZCML config for ZCA. (Was: Anyone want to do Google Summer of code mentoring for PSF?)

2011-03-21 Thread Lennart Regebro
Also, the decorators will always return the original component, meaning they can easily be used as post-config: @adapter(IMyFace, IMyFeet) class FootInMouth(object): ... Will mark the class as an adapter, but not register it. @adapt(IMyFace, IMyFeet) class FootInMouth(object): ... Will