From 62aefb7d161a866b3bf198d3395096ea0052a128 Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Mon, 14 Feb 2005 22:43:16 +0000 Subject: [PATCH] - Removal of Services. You can now access the adapter and utiliy registry directly via the site manager's `adapters` and `utilities` attribute, respecitvely. + Converted Principal Annotation Service to be a utility. Added database evolution code to convert all service instances to utilities. + Converted FSSync Service to be a utility. + Created the concept of a global site manager. The adapter and utility registry, formerly the adapter and utility service, are now managed by the site manager. + The `zope.app.utility` package has been merged into `zope.app.component`. The utility registration class is in `site.py`. The utility vocabulary is in `vocabulary.py`. + The `zope.app.site` package has been merged into `zope.app.component`. The site code can be found in `site.py`. + Fixed persistent modules code. Persistent modules are now simply utilities providing `IModuleManager`. The local site manager also does not know any thing about persistent modules anymore. + Updated `zope.app.pluggableauth`, so that it will work as an authentication utility. + Restructured `zope.app.persentation` (a.k.a page folders) to the new component API. - Simplified the registration framework by only supporting two states: active and inactive. This allowed us to get rid of the registration stack and the complexity it introduced to the site management. - Removed all presentation-related APIs from `zope.component`. This included the removal of presentation-related interfaces and the deprecation of all view-related API functions. One should use the adapter API functions instead. - Implemented some initial deprecation framework, see `zope.deprecation`. It allows one to deprecate methods and properties in classes as well as any name in a module. - Moved reusable test setups/APIs from `zope.app.tests` to `zope.app.testing`. No reusable testing code should be in a `tests` package or module. --- tests.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests.py b/tests.py index cc8f273..0b5eecd 100644 --- a/tests.py +++ b/tests.py @@ -18,22 +18,22 @@ import os import unittest import zope.event -from zope.component.tests import placelesssetup +from zope.component import testing def tearDown(test): - placelesssetup.tearDown(test) + testing.tearDown(test) zope.event.subscribers.pop() def setUp(test): test.globs['this_directory'] = os.path.dirname(__file__) - placelesssetup.setUp(test) + testing.setUp(test) def test_suite(): from zope.testing import doctest suite = unittest.TestSuite() # suite.addTest(doctest.DocTestSuite()) suite.addTest(doctest.DocFileSuite('README.txt', tearDown=tearDown, - setUp=placelesssetup.setUp)) + setUp=testing.setUp)) suite.addTest(doctest.DocFileSuite( 'xpdl.txt', tearDown=tearDown, setUp=setUp, optionflags=doctest.NORMALIZE_WHITESPACE)) @@ -41,4 +41,3 @@ def test_suite(): if __name__ == '__main__': unittest.main(defaultTest='test_suite') -