[Zope-dev] Re: zcml filtering
Wichert Akkerman
wichert at wiggy.net
Fri Aug 8 09:08:44 EDT 2008
Previously Philipp von Weitershausen wrote:
> Marius Gedminas wrote:
> >On Tue, Aug 05, 2008 at 10:36:30PM +0100, Martin Aspeli wrote:
> >>Subscribers and subscription adapters are particularly bad in this way,
> >>since they are unnamed and thus can't be "overridden", only amended to.
> >>
> >>We've talked about an "off" switch for ZCML before. Given that we have a
> >>configuration machine that's capable of doing overrides based on
> >>discriminators, why couldn't we have support for negatives, e.g.
> >>
> >><unconfigure>
> >> <utility ... />
> >></unconfigure>
> >>
> >>This could use a special _context that would record callables and
> >>discriminators, and then look for the corresponding
> >>callables/discriminators in the real context and remove them before that
> >>context was configured.
> >
> >Subscribers don't have discriminators, unfortunately.
>
> Indeed they don't. That just makes them harder to track down, though.
>
> I'm working on a package for this functionality in z3c.unconfigure right
> now. Name inspired by Martin's suggestion above; my original prototype
> used had a different name but this is much better :).
I am using z3c.unconfigure now and it works perfectly.
Wichert.
--
Wichert Akkerman <wichert at wiggy.net> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
More information about the Zope-Dev
mailing list