[Zope-CMF] CMFDefault.utils is not monkey-patchable
Paul Winkler
pw_lists@slinkp.com
Wed, 13 Nov 2002 15:37:44 -0800
On Wed, Nov 13, 2002 at 09:16:07AM -0800, Paul Winkler wrote:
(snip)
> ... So all the lines in __init__.py
> of the form utils.initializeBasesPhase2(...)
> could be safely replaced with
> CMFCore.utils.initializeBasesPhase2(...)
>
> I will change this locally and see if it hurts anything,
> and report back.
Seems to be fine.
below is a diff against CMFDefault/__init__.py for
anyone who's interested.
--Paul Winkler
31c31,33
< from Products.CMFCore import utils
---
> #from Products.CMFCore import utils # BAD ... it masks CMFDefault.utils
> from Products import CMFCore
>
33a36
>
107,108c110,111
< z_bases = utils.initializeBasesPhase1( bases, this_module )
< z_tool_bases = utils.initializeBasesPhase1( tools, this_module )
---
> z_bases = CMFCore.utils.initializeBasesPhase1( bases, this_module )
> z_tool_bases = CMFCore.utils.initializeBasesPhase1( tools, this_module )
118,120c121,123
< utils.initializeBasesPhase2( z_bases, context )
< utils.initializeBasesPhase2( z_tool_bases, context )
< utils.ToolInit('CMFDefault Tool', tools=tools,
---
> CMFCore.utils.initializeBasesPhase2( z_bases, context )
> CMFCore.utils.initializeBasesPhase2( z_tool_bases, context )
> CMFCore.utils.ToolInit('CMFDefault Tool', tools=tools,
124c127
< utils.ContentInit( 'CMFDefault Content'
---
> CMFCore.utils.ContentInit( 'CMFDefault Content'
136c139
< utils.registerIcon(DefaultWorkflow.DefaultWorkflowDefinition,
---
> CMFCore.utils.registerIcon(DefaultWorkflow.DefaultWorkflowDefinition,