[Zope-Checkins] SVN: Zope/trunk/ Changed the default for ``enable-product-installation`` to off. This matches the default behavior of buildout installs via plone.recipe.zope2instance.
Hanno Schlichting
hannosch at hannosch.eu
Thu Jun 24 11:44:13 EDT 2010
Log message for revision 113798:
Changed the default for ``enable-product-installation`` to off. This matches the default behavior of buildout installs via plone.recipe.zope2instance.
Changed:
U Zope/trunk/doc/CHANGES.rst
U Zope/trunk/src/OFS/tests/testProductInit.py
U Zope/trunk/src/Zope2/Startup/zopeschema.xml
U Zope/trunk/src/Zope2/utilities/skel/etc/zope.conf.in
-=-
Modified: Zope/trunk/doc/CHANGES.rst
===================================================================
--- Zope/trunk/doc/CHANGES.rst 2010-06-24 15:26:38 UTC (rev 113797)
+++ Zope/trunk/doc/CHANGES.rst 2010-06-24 15:44:13 UTC (rev 113798)
@@ -11,6 +11,9 @@
Restructuring
+++++++++++++
+- Changed the default for ``enable-product-installation`` to off. This matches
+ the default behavior of buildout installs via plone.recipe.zope2instance.
+
- Removed outdated check_python_version function from startup process.
- ZPublisher: Removed 'Main' and 'Zope' wrappers for Test.publish.
Modified: Zope/trunk/src/OFS/tests/testProductInit.py
===================================================================
--- Zope/trunk/src/OFS/tests/testProductInit.py 2010-06-24 15:26:38 UTC (rev 113797)
+++ Zope/trunk/src/OFS/tests/testProductInit.py 2010-06-24 15:44:13 UTC (rev 113798)
@@ -222,17 +222,23 @@
app = getApp()
from OFS.Application import install_products
install_products(app)
- obids = app.Control_Panel.Products.objectIds()
+ obids = app.Control_Panel.Products.keys()
+ self.assertEquals(obids, [])
+
+ def test_install_products_enabled(self):
+ self.makeFakeProducts()
+ cfg2 = cfg + '\nenable-product-installation on'
+ self.configure(cfg2)
+ app = getApp()
+ from OFS.Application import install_products
+ install_products(app)
+ obids = app.Control_Panel.Products.keys()
for name in FAKEPRODUCTS:
- assert name in obids
+ self.assert_(name in obids)
+
+
def test_suite():
suite = unittest.TestSuite()
suite.addTest( unittest.makeSuite( TestProductInit ) )
return suite
-
-def main():
- unittest.main(defaultTest='test_suite')
-
-if __name__ == '__main__':
- main()
Modified: Zope/trunk/src/Zope2/Startup/zopeschema.xml
===================================================================
--- Zope/trunk/src/Zope2/Startup/zopeschema.xml 2010-06-24 15:26:38 UTC (rev 113797)
+++ Zope/trunk/src/Zope2/Startup/zopeschema.xml 2010-06-24 15:44:13 UTC (rev 113798)
@@ -423,15 +423,14 @@
<metadefault>unset</metadefault>
</key>
- <key name="enable-product-installation" datatype="boolean" default="on">
+ <key name="enable-product-installation" datatype="boolean" default="off">
<description>
If this directive is turned on, Zope performs 'product installation'
(the registration of Python modules in various Products directories)
- at startup. Turning this off can speed Zope startup time, but it can
- also cause your Control_Panel Product list to become desynchronized
- with the contents of your Products directories.
+ at startup. Only turn this on if your code relies on the Products section
+ in the Control_Panel to be populated.
</description>
- <metadefault>on</metadefault>
+ <metadefault>off</metadefault>
</key>
<key name="locale" datatype="locale" handler="locale">
Modified: Zope/trunk/src/Zope2/utilities/skel/etc/zope.conf.in
===================================================================
--- Zope/trunk/src/Zope2/utilities/skel/etc/zope.conf.in 2010-06-24 15:26:38 UTC (rev 113797)
+++ Zope/trunk/src/Zope2/utilities/skel/etc/zope.conf.in 2010-06-24 15:44:13 UTC (rev 113798)
@@ -168,21 +168,14 @@
# Description:
# If this directive is turned on, Zope performs 'product installation'
# (the registration of Python modules in various Products directories)
-# at startup. Turning this off can speed Zope/ZEO startup time,
-# but it can also cause your Control_Panel Product list to become
-# desynchronized with the contents of your Products
-# directories. NOTE: Zope *must* be started at least once with
-# this directive set to "on" or you will receive an error. If using ZEO,
-# at least one ZEO client must be run with this directive set to "on"
-# once, the others can have it turned off.
-# NOTE: If your main storage is mounted read-only,
-# you must set this directive to "off".
+# at startup. Only turn this on if your code relies on the Products
+# section in the Control_Panel to be populated.
#
-# Default: on
+# Default: off
#
# Example:
#
-# enable-product-installation off
+# enable-product-installation on
# Directive: locale
#
More information about the Zope-Checkins
mailing list