[Zope-dev] five.localsitemanager and unregisterUtility
Hanno Schlichting
hanno at hannosch.eu
Fri Oct 9 08:41:14 EDT 2009
Hi Sylvain.
I'm including Michael here, who's added the mentioned feature in the
first place.
On Fri, Oct 9, 2009 at 2:22 PM, Sylvain Viollon <sylvain at infrae.com> wrote:
> I used to use those features in Silva. It work well with 0.4, but
> it's broken in 1.x. (I have tests in Silva testing that).
>
> This have to do with the wrapping (to remember the aquisition path)
> of an utility which is done inside the registry by registerUtility,
> which breaks the unregisterUtility.
>
> unregisterUtility is checking that the component you want to
> unregister is the same than the one which is in the registry, for
> the same specification, which is not true, because the one in the
> registry in wrapped with a ComponentPathWrapper (in register).
>
> If you do grep unregisterUtility in five.localsitemanager, you have
> no match, but the site API defines both, so they should both
> works (and so be tested).
>
> I volunteer myself to add test (and fix it) in the SVN, as I need
> that fix.
>
> Does anyone have an objection with that ?
No objection, please go ahead.
> Does any official maintainer will do a release (1.1.1, as it will be
> a bug fix) afterwards ?
Sure, ping me once you are done and I'll cut a new release. Michael,
do you want to test anything, before I do a new release?
> (of course, the trunk will need to be fixed if the same problem is
> present, and no, I do not want to use the trunk, but the 1.x branch).
There were some changes to the registerUtility code on trunk
(incorporating bug fixes from zope.component), but these had to do
with re-registering utilities and the implicit unregister that happens
during that.
As unregisterUtility is still not overridden, I suspect the same
problem still exits and your tests should show that.
Thanks,
Hanno
More information about the Zope-Dev
mailing list