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)
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.
......
......@@ -222,17 +222,23 @@ class TestProductInit( unittest.TestCase ):
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()
......@@ -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">
......
......@@ -168,21 +168,14 @@ instancehome $INSTANCE
# 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
#
......
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