[Zope3-checkins] SVN: Zope3/branches/srichter-blow-services/src/zope/component/ Inserted some deprecation warnings.

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu Dec 16 16:15:22 EST 2004


Log message for revision 28637:
  Inserted some deprecation warnings.
  

Changed:
  U   Zope3/branches/srichter-blow-services/src/zope/component/__init__.py
  U   Zope3/branches/srichter-blow-services/src/zope/component/bbb/tests/__init__.py
  U   Zope3/branches/srichter-blow-services/src/zope/component/bbb/tests/components.py
  U   Zope3/branches/srichter-blow-services/src/zope/component/bbb/tests/placelesssetup.py
  U   Zope3/branches/srichter-blow-services/src/zope/component/bbb/tests/request.py

-=-
Modified: Zope3/branches/srichter-blow-services/src/zope/component/__init__.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/component/__init__.py	2004-12-16 20:54:28 UTC (rev 28636)
+++ Zope3/branches/srichter-blow-services/src/zope/component/__init__.py	2004-12-16 21:15:21 UTC (rev 28637)
@@ -39,14 +39,16 @@
 from zope.component.bbb import contextdependent
 sys.modules['zope.component.contextdependent'] = contextdependent
 
+from zope.component.bbb import tests as bbb_tests
+bbb_tests.__warn__ = False
 from zope.component.bbb.tests import placelesssetup
 sys.modules['zope.component.tests.placelesssetup'] = placelesssetup
 from zope.component.bbb.tests import request
 sys.modules['zope.component.tests.request'] = request
 from zope.component.bbb.tests import components
 sys.modules['zope.component.tests.components'] = components
+bbb_tests.__warn__ = True
 
-
 service.__warn__ = False
 service.serviceManager = service.GlobalServiceManager(
     'serviceManager', __name__, globalSiteManager)

Modified: Zope3/branches/srichter-blow-services/src/zope/component/bbb/tests/__init__.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/component/bbb/tests/__init__.py	2004-12-16 20:54:28 UTC (rev 28636)
+++ Zope3/branches/srichter-blow-services/src/zope/component/bbb/tests/__init__.py	2004-12-16 21:15:21 UTC (rev 28637)
@@ -1,2 +1,3 @@
 # Make directory a package.
 
+__warn__ = True

Modified: Zope3/branches/srichter-blow-services/src/zope/component/bbb/tests/components.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/component/bbb/tests/components.py	2004-12-16 20:54:28 UTC (rev 28636)
+++ Zope3/branches/srichter-blow-services/src/zope/component/bbb/tests/components.py	2004-12-16 21:15:21 UTC (rev 28637)
@@ -15,8 +15,18 @@
 
 $Id$
 """
+import warnings
 from zope.interface import Interface, Attribute, implements
 
+from zope.component import bbb
+
+if bbb.tests.__warn__:
+    warnings.warn(
+        "`zope.component.tests.components` has been deprecated, since the "
+        " contained helper objects were very simple and did not add much "
+        "value.",
+        DeprecationWarning, 2)
+
 class RecordingAdapter(object):
 
     def __init__(self):

Modified: Zope3/branches/srichter-blow-services/src/zope/component/bbb/tests/placelesssetup.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/component/bbb/tests/placelesssetup.py	2004-12-16 20:54:28 UTC (rev 28636)
+++ Zope3/branches/srichter-blow-services/src/zope/component/bbb/tests/placelesssetup.py	2004-12-16 21:15:21 UTC (rev 28637)
@@ -15,20 +15,12 @@
 
 $Id$
 """
-from zope.testing import cleanup
+import warnings
+from zope.component.testing import *
+from zope.component import bbb
 
-# A mix-in class inheriting from CleanUp that also connects the CA services
-class PlacelessSetup(cleanup.CleanUp):
-
-    def setUp(self):
-        super(PlacelessSetup, self).setUp()
-
-    def tearDown(self):
-        super(PlacelessSetup, self).tearDown()
-
-
-def setUp(test):
-    cleanup.setUp()
-
-def tearDown(test):
-    cleanup.tearDown()
+if bbb.tests.__warn__:
+    warnings.warn(
+        "`zope.component.tests.placelesssetup` is superceded by "
+        "`zope.component.testing`.",
+        DeprecationWarning, 2)

Modified: Zope3/branches/srichter-blow-services/src/zope/component/bbb/tests/request.py
===================================================================
--- Zope3/branches/srichter-blow-services/src/zope/component/bbb/tests/request.py	2004-12-16 20:54:28 UTC (rev 28636)
+++ Zope3/branches/srichter-blow-services/src/zope/component/bbb/tests/request.py	2004-12-16 21:15:21 UTC (rev 28637)
@@ -15,9 +15,17 @@
 
 $Id$
 """
+import warnings
 import zope.interface
 
+from zope.component import bbb
 
+if bbb.tests.__warn__:
+    warnings.warn(
+        "`zope.component.tests.request` is deprecated, since the component "
+        "architecture does not support presentation components anymore.",
+        DeprecationWarning, 2)
+
 class Request(object):
 
     def __init__(self, type, skin=None):



More information about the Zope3-Checkins mailing list