[Checkins] SVN: van.testing/trunk/ Use zope.configuration rather than zope.app.appsetup for setting up zcml.

Brian Sutherland jinty at web.de
Wed Apr 1 12:07:00 EDT 2009


Log message for revision 98759:
  Use zope.configuration rather than zope.app.appsetup for setting up zcml.

Changed:
  U   van.testing/trunk/CHANGES.txt
  U   van.testing/trunk/setup.py
  U   van.testing/trunk/van/testing/layer.py

-=-
Modified: van.testing/trunk/CHANGES.txt
===================================================================
--- van.testing/trunk/CHANGES.txt	2009-04-01 16:02:27 UTC (rev 98758)
+++ van.testing/trunk/CHANGES.txt	2009-04-01 16:06:59 UTC (rev 98759)
@@ -4,7 +4,10 @@
 1.0.1 (unknown)
 ------------------
 
-- ???
+- Remove dependencies by using zope.configuration.xmlconfig to setup zcml
+  rather than zope.app.appsetup.  This leaves out some security configuration
+  but the win from less dependencies is massive. In my tests, no tests had any
+  issues with this.
 
 1.0.0 (2008-11-21)
 ------------------

Modified: van.testing/trunk/setup.py
===================================================================
--- van.testing/trunk/setup.py	2009-04-01 16:02:27 UTC (rev 98758)
+++ van.testing/trunk/setup.py	2009-04-01 16:06:59 UTC (rev 98759)
@@ -23,7 +23,7 @@
     )
 
 setup(name="van.testing",
-      version='1.0.1dev',
+      version='2.0.0dev',
       license='ZPL 2.1',
       url='http://pypi.python.org/pypi/van.timeformat',
       author_email='zope-dev at zope.org',
@@ -33,7 +33,8 @@
       namespace_packages=["van"],
       install_requires=[
           'setuptools',
-          'zope.app.appsetup',
+          'zope.app.component',
+          'zope.configuration',
           'zope.testing',
           ],
     classifiers=[

Modified: van.testing/trunk/van/testing/layer.py
===================================================================
--- van.testing/trunk/van/testing/layer.py	2009-04-01 16:02:27 UTC (rev 98758)
+++ van.testing/trunk/van/testing/layer.py	2009-04-01 16:06:59 UTC (rev 98759)
@@ -11,7 +11,8 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-from zope.app.appsetup import config
+from zope.configuration import xmlconfig
+from zope.app.component import hooks # BBB: import from zope.site at a later date
 from zope.testing.cleanup import cleanUp
 
 def null_layer(layer):
@@ -75,7 +76,8 @@
     """
 
     def setUp(cls):
-        config(cls.zcml)
+        hooks.setHooks()
+        context = xmlconfig.file(cls.zcml)
     layer.setUp = classmethod(setUp)
 
     def tearDown(cls):



More information about the Checkins mailing list