[Zope] declarePublic function

Milos Prudek prudek at bvx.cz
Tue Jan 27 08:06:16 EST 2009

I would like to upgrade my site from Zope 2.7.x to Zope 2.10.x

When I try to run my site under Zope 2.10.x, I get this exception:

  class JMZPTMacros:
  File "/home/orl/Zope/Products/JMZPTMacros/JMZPTMacros.py", line 28, in 
TypeError: declarePublic() takes at least 2 arguments (1 given)

I need to use JMZPTMacros. It is an old product that seems to require a patch 
to line 28. I can see that Zope 2.7.x defines declarePublic() as:
def declarePublic(self, *names):

and that Zope 2.10.x defines declarePublic() as:
def declarePublic(self, name, *names):

therefore I understand that one parameter is obligatory. But I cannot guess 
what parameter it should be for JMZPTMacros. I tried to look how 
declarePublic is used inside Zope but it gave me no clue.

Please help.

Milos Prudek

More information about the Zope mailing list