[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/ Changed
the way ILayer was deprecated to avoid spurious warning from
Jim Fulton
jim at zope.com
Sun Apr 23 12:06:09 EDT 2006
Log message for revision 67553:
Changed the way ILayer was deprecated to avoid spurious warning from
apidoc.
Why isn't LayerField deprecated?
Changed:
U Zope3/branches/jim-adapter/src/zope/app/component/fields.py
U Zope3/branches/jim-adapter/src/zope/publisher/interfaces/__init__.py
A Zope3/branches/jim-adapter/src/zope/publisher/interfaces/back35.py
U Zope3/branches/jim-adapter/src/zope/publisher/interfaces/browser.py
-=-
Modified: Zope3/branches/jim-adapter/src/zope/app/component/fields.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/app/component/fields.py 2006-04-23 16:06:06 UTC (rev 67552)
+++ Zope3/branches/jim-adapter/src/zope/app/component/fields.py 2006-04-23 16:06:09 UTC (rev 67553)
@@ -26,10 +26,9 @@
# BBB 2006/02/18, to be removed after 12 months
import zope.deprecation
-zope.deprecation.__show__.off()
-from zope.publisher.interfaces import ILayer
-zope.deprecation.__show__.on()
+from zope.publisher.interfaces.back35 import ILayer
+# XXX why osn't LayerField deprecated?
class LayerField(GlobalObject):
r"""This field represents a layer.
Modified: Zope3/branches/jim-adapter/src/zope/publisher/interfaces/__init__.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/publisher/interfaces/__init__.py 2006-04-23 16:06:06 UTC (rev 67552)
+++ Zope3/branches/jim-adapter/src/zope/publisher/interfaces/__init__.py 2006-04-23 16:06:09 UTC (rev 67553)
@@ -17,9 +17,15 @@
"""
__docformat__ = "reStructuredText"
+import zope.deferredimport
+
+zope.deferredimport.deprecated(
+ "ILayer will go away in Zope 3.5",
+ ILayer = 'zope.publisher.interfaces.back35:ILayer',
+ )
+
from zope.component.interfaces import IPresentationRequest
from zope.interface import Interface, Attribute, implements
-from zope.interface.interfaces import IInterface
from zope.interface.common.mapping import IEnumerableMapping
from zope.interface.common.interfaces import IException, ILookupError
from zope.security.interfaces import Unauthorized, IParticipation
@@ -452,21 +458,3 @@
class IRequest(IPublisherRequest, IPublicationRequest, IApplicationRequest):
"""The basic request contract
"""
-
-
-##############################################################################
-#
-# BBB 2006/02/18, to be removed after 12 months
-#
-
-class ILayer(IInterface):
- """A grouping of related views for a request."""
-
-import zope.deprecation
-zope.deprecation.deprecated('ILayer',
- 'The zope.publisher.interfaces.ILayer '
- 'interface has been deprecated and will '
- 'go away in Zope 3.5.')
-
-#
-##############################################################################
Added: Zope3/branches/jim-adapter/src/zope/publisher/interfaces/back35.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/publisher/interfaces/back35.py 2006-04-23 16:06:06 UTC (rev 67552)
+++ Zope3/branches/jim-adapter/src/zope/publisher/interfaces/back35.py 2006-04-23 16:06:09 UTC (rev 67553)
@@ -0,0 +1,22 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Deprecated things that should go away in Zope 3.5.
+
+$Id$
+"""
+
+from zope.interface.interfaces import IInterface
+
+class ILayer(IInterface):
+ """A grouping of related views for a request."""
Property changes on: Zope3/branches/jim-adapter/src/zope/publisher/interfaces/back35.py
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Modified: Zope3/branches/jim-adapter/src/zope/publisher/interfaces/browser.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/publisher/interfaces/browser.py 2006-04-23 16:06:06 UTC (rev 67552)
+++ Zope3/branches/jim-adapter/src/zope/publisher/interfaces/browser.py 2006-04-23 16:06:09 UTC (rev 67553)
@@ -127,10 +127,7 @@
#
# mark the default layer for BBB reasons
-import zope.deprecation
-zope.deprecation.__show__.off()
-from zope.publisher.interfaces import ILayer
-zope.deprecation.__show__.on()
+from zope.publisher.interfaces.back35 import ILayer
directlyProvides(IDefaultBrowserLayer, ILayer)
import zope.deprecation
More information about the Zope3-Checkins
mailing list