Hi there,

I'm trying to pull chameleon into a project that's still using zope
3.4. By consequence of the last changes, repoze.zcml is now being
pulled in. There is a problem though: repoze.zcml is not completely
compatible with zope 3.4. The following error happens at startup time:

  File "/home/sidnei/src/lp/template-speedup/database/schema/../../lib/
zope/configuration/config.py", line 610, in execute_actions
  File "/home/sidnei/virtual/chameleon/lib/python2.4/site-packages/
repoze.zcml-0.2-py2.4.egg/repoze/zcml/__init__.py", line 14, in
handler
    method(*args, **kwargs)
zope.configuration.config.ConfigurationExecutionError:
exceptions.TypeError: registerUtility() got an unexpected keyword
argument 'factory'
  in:
  File "/home/sidnei/src/chameleon/deps/chameleon.zpt/src/chameleon/
zpt/configure.zcml", line 6.2-8.50
    <utility
       name="python"
       component=".expressions.python_translator" />

The problem is caused by this snippet from repoze.zcml:

    _context.action(
        discriminator = ('utility', provides, name),
        callable = handler,
        args = ('registerUtility', component, provides, name),
        kw = dict(factory=factory),
        )


Casual inspection shows that the 'factory' argument to registerUtility
did not exist on zope 3.4. Looks like an easy fix, though I will leave
it up to you guys on how to best fix it. In my environment, I just
removed the line that passes 'factory' along and then everything else
seems to work fine (read: it starts up).

--
Sidnei da Silva
_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to