Commit 620b2e65 authored by Hanno Schlichting's avatar Hanno Schlichting

Changed the default for ``enable-product-installation`` to off. This matches...

Changed the default for ``enable-product-installation`` to off. This matches the default behavior of buildout installs via plone.recipe.zope2instance.
parent cbd41016
...@@ -11,6 +11,9 @@ Trunk (unreleased) ...@@ -11,6 +11,9 @@ Trunk (unreleased)
Restructuring 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. - Removed outdated check_python_version function from startup process.
- ZPublisher: Removed 'Main' and 'Zope' wrappers for Test.publish. - ZPublisher: Removed 'Main' and 'Zope' wrappers for Test.publish.
......
...@@ -222,17 +222,23 @@ class TestProductInit( unittest.TestCase ): ...@@ -222,17 +222,23 @@ class TestProductInit( unittest.TestCase ):
app = getApp() app = getApp()
from OFS.Application import install_products from OFS.Application import install_products
install_products(app) 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: for name in FAKEPRODUCTS:
assert name in obids self.assert_(name in obids)
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
suite.addTest( unittest.makeSuite( TestProductInit ) ) suite.addTest( unittest.makeSuite( TestProductInit ) )
return suite return suite
def main():
unittest.main(defaultTest='test_suite')
if __name__ == '__main__':
main()
...@@ -423,15 +423,14 @@ ...@@ -423,15 +423,14 @@
<metadefault>unset</metadefault> <metadefault>unset</metadefault>
</key> </key>
<key name="enable-product-installation" datatype="boolean" default="on"> <key name="enable-product-installation" datatype="boolean" default="off">
<description> <description>
If this directive is turned on, Zope performs 'product installation' If this directive is turned on, Zope performs 'product installation'
(the registration of Python modules in various Products directories) (the registration of Python modules in various Products directories)
at startup. Turning this off can speed Zope startup time, but it can at startup. Only turn this on if your code relies on the Products section
also cause your Control_Panel Product list to become desynchronized in the Control_Panel to be populated.
with the contents of your Products directories.
</description> </description>
<metadefault>on</metadefault> <metadefault>off</metadefault>
</key> </key>
<key name="locale" datatype="locale" handler="locale"> <key name="locale" datatype="locale" handler="locale">
......
...@@ -168,21 +168,14 @@ instancehome $INSTANCE ...@@ -168,21 +168,14 @@ instancehome $INSTANCE
# Description: # Description:
# If this directive is turned on, Zope performs 'product installation' # If this directive is turned on, Zope performs 'product installation'
# (the registration of Python modules in various Products directories) # (the registration of Python modules in various Products directories)
# at startup. Turning this off can speed Zope/ZEO startup time, # at startup. Only turn this on if your code relies on the Products
# but it can also cause your Control_Panel Product list to become # section in the Control_Panel to be populated.
# 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".
# #
# Default: on # Default: off
# #
# Example: # Example:
# #
# enable-product-installation off # enable-product-installation on
# Directive: locale # Directive: locale
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment