[Zope-Checkins] SVN: Zope/trunk/ copy the list of packages to initialize. install_package calls package_initialized which removes from the list

David Glick davidglick at onenw.org
Mon Sep 27 23:17:51 EDT 2010


Log message for revision 116995:
  copy the list of packages to initialize. install_package calls package_initialized which removes from the list

Changed:
  U   Zope/trunk/doc/CHANGES.rst
  U   Zope/trunk/src/OFS/Application.py

-=-
Modified: Zope/trunk/doc/CHANGES.rst
===================================================================
--- Zope/trunk/doc/CHANGES.rst	2010-09-27 22:26:34 UTC (rev 116994)
+++ Zope/trunk/doc/CHANGES.rst	2010-09-28 03:17:49 UTC (rev 116995)
@@ -11,6 +11,9 @@
 Bugs Fixed
 ++++++++++
 
+- Avoid iterating over the list of packages to initialize while it is being
+  mutated, which was skipping some packages.
+
 - Fixed two unit tests that failed on fast Windows machines.
 
 - Fixed OverflowError in Products.ZCatalog.Lazy on 64bit python

Modified: Zope/trunk/src/OFS/Application.py
===================================================================
--- Zope/trunk/src/OFS/Application.py	2010-09-27 22:26:34 UTC (rev 116994)
+++ Zope/trunk/src/OFS/Application.py	2010-09-28 03:17:49 UTC (rev 116995)
@@ -535,7 +535,7 @@
                         folder_permissions, raise_exc=debug_mode)
 
     # Delayed install of packages-as-products
-    for module, init_func in get_packages_to_initialize():
+    for module, init_func in tuple(get_packages_to_initialize()):
         install_package(app, module, init_func, raise_exc=debug_mode)
 
     Products.meta_types=Products.meta_types+tuple(meta_types)



More information about the Zope-Checkins mailing list