This proposal is now implemented on CMF and five.localsitemanager trunk.
Everything *seems* to work, but maybe I'm missing something. This might
be a good time to review and test the changes - any feedback is welcome.
Well done - great work! :)
There are 10 tools in CMF that are not ready for being used as
utilities, they have to be used the old way until they are fixed:
Are these registered as utilities as all? Or only available using
These 15 CMF tools are registered as utilities, AFAICS only the security
machinery uses their acquisition context (except for portal_membership,
which uses 'self.acl_users'):
five.localsitemanager now returns wrapped utilities without
RequestContainers. This requires a new LookupClass.
Do we still get deprecation warnings if these are looked up using
My feeling is that we should *not* get deprecating warnings for these.
It's rather late in the day for this release to officially deprecate
such fundamental parts of CMF, and I fear that people won't be able to
remember which tools are now utilities and which ones are tools, since
the distinction really comes down to implementation detail.
Hopefully, the path forward is that *all* the tools become utilities
(your last to-do below). In that case, I think full deprecation of
lookup via getToolByName makes sense, since we have a uniform API
(getUtility()) for looking up CMF's fundamental components. Until then,
I think we should give people the choice on the utilities we still have,
but not prod them too hard.
- real world testing
- backport to the CMF 2.1 branch
Is this in the pipeline? i.e. will this code land in Plone 3.0? :-)
- write migration code for CMF 2.1 beta sites that replaces the
LookupClass and removes some utility registrations
Plone will likely need the same migrations.
- fix the GenericSetup handler
- figure out if we can make acl_users an utility
- in the long run, modify all tools to make them work as utilities
Yes - as per above, I think this needs to be the ultimate goal.
AFAICS, KSS will no longer need the monkey patch if it sets the
LookupClass to FiveVerifyingAdapterLookup.
Great - this is really wonderful news.
Acquisition is a jealous mistress
Zope-CMF maillist - Zope-CMF@lists.zope.org
See http://collector.zope.org/CMF for bug reports and feature requests