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
    method(*args, **kwargs)
exceptions.TypeError: registerUtility() got an unexpected keyword
argument 'factory'
  File "/home/sidnei/src/chameleon/deps/chameleon.zpt/src/chameleon/
zpt/configure.zcml", line 6.2-8.50
       component=".expressions.python_translator" />

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

        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

Reply via email to