[z3] Recursion problem with Five 1.2b - fix attached
Sasha Vincic
sasha at systemvaruhuset.com
Fri Nov 11 13:00:56 CET 2005
I am trying to make some Five localsite svn stuff work with Five
1.2b. Since I don't have commit rights for Five here is a small diff
and explaination.
After upgrading to Five 1.2b and changing five:sendEvents to
five:deprecatedManageAddDelete and adding five:containerEvents I got
recursion problem.
I figured out that loading the event.zcml in doMonkies() started the
action execution over again and at top of the list was my configure
file with containerEvents, so the loop was a fact.
This fix removed my recursion problem but tests in event.txt fail.
diff -r Five/event.py Products/Five/event.py
590c590
< zcml.load_config('event.zcml', Products.Five)
---
> zcml.load_config('event.zcml', Products.Five, False)
diff -r Five/tests/event.txt Products/Five/tests/event.txt
183a184
> >>> zcml.load_config('event.zcml', Products.Five)
diff -r Five/zcml.py Products/Five/zcml.py
44c44
< def load_config(file, package=None):
---
> def load_config(file, package=None, execute=True):
50c50
< _context = xmlconfig.file(file, package, _context)
---
> _context = xmlconfig.file(file, package, _context,
execute=execute)
My traceback snippet:
Traceback (most recent call last):
File "/var/local/zope28/lib/python/Testing/ZopeTestCase/base.py",
line 92, in setUp
self.afterSetUp()
File "/var/local/zope-instances/eeawebservices/eeawebservices-
client2/Products/aliss/tests/test_aliss.py", line 31, in afterSetUp
zcml.load_config("configure.zcml", Products.aliss)
File "/var/local/zope-instances/eeawebservices/eeawebservices-
client2/Products/Five/zcml.py", line 50, in load_config
_context = xmlconfig.file(file, package, _context)
File "/var/local/zope28/lib/python/zope/configuration/
xmlconfig.py", line 441, in file
context.execute_actions()
File "/var/local/zope28/lib/python/zope/configuration/config.py",
line 585, in execute_actions
callable(*args, **kw)
File "/var/local/zope-instances/eeawebservices/eeawebservices-
client2/Products/Five/event.py", line 535, in doMonkies
zcml.load_config('event.zcml', Products.Five)
File "/var/local/zope-instances/eeawebservices/eeawebservices-
client2/Products/Five/zcml.py", line 50, in load_config
_context = xmlconfig.file(file, package, _context)
File "/var/local/zope28/lib/python/zope/configuration/
xmlconfig.py", line 441, in file
context.execute_actions()
File "/var/local/zope28/lib/python/zope/configuration/config.py",
line 585, in execute_actions
callable(*args, **kw)
File "/var/local/zope-instances/eeawebservices/eeawebservices-
client2/Products/Five/event.py", line 535, in doMonkies
zcml.load_config('event.zcml', Products.Five)
More information about the z3
mailing list