On Wed, Jan 5, 2011 at 6:05 PM, Martin Pool <email address hidden> wrote:
> They are not registered at the moment, and to fix this bug they need to
> be. There are of course various ways to do this in Python. One that I
> was thinking of was:
>
> * register them centrally
> * refer to them just by string name
> * raise an error or a warning if a name is used that was not previously registered
For flag names that's the approach I was favoring.
> Does Launchpad already have a Registry concept like in bzr, or is there
> a Zope idiom we should use?
Yep, the Zope component architecture can be used as a general registry
like this. When I want a registry of callable things the ZCA is where
I start.
The scopes registry will need to be a little more complicated, but it
won't be too bad.
> Please request a review from me (but don't block on getting an answer),
> and feel free to ping me if you want to talk.
On Wed, Jan 5, 2011 at 6:05 PM, Martin Pool <email address hidden> wrote:
> They are not registered at the moment, and to fix this bug they need to
> be. There are of course various ways to do this in Python. One that I
> was thinking of was:
>
> * register them centrally
> * refer to them just by string name
> * raise an error or a warning if a name is used that was not previously registered
For flag names that's the approach I was favoring.
> Does Launchpad already have a Registry concept like in bzr, or is there
> a Zope idiom we should use?
Yep, the Zope component architecture can be used as a general registry
like this. When I want a registry of callable things the ZCA is where
I start.
The scopes registry will need to be a little more complicated, but it
won't be too bad.
> Please request a review from me (but don't block on getting an answer),
> and feel free to ping me if you want to talk.
Will do.
--
Benji York