[Zope3-checkins] SVN: Zope3/trunk/src/zope/component/bbb/ Forward
port deprecation warning fix to Zope 3 trunk.
Martijn Faassen
faassen at infrae.com
Sat Sep 24 18:35:30 EDT 2005
Log message for revision 38606:
Forward port deprecation warning fix to Zope 3 trunk.
Changed:
U Zope3/trunk/src/zope/component/bbb/__init__.py
U Zope3/trunk/src/zope/component/bbb/interfaces.py
-=-
Modified: Zope3/trunk/src/zope/component/bbb/__init__.py
===================================================================
--- Zope3/trunk/src/zope/component/bbb/__init__.py 2005-09-24 22:04:08 UTC (rev 38605)
+++ Zope3/trunk/src/zope/component/bbb/__init__.py 2005-09-24 22:35:29 UTC (rev 38606)
@@ -178,8 +178,7 @@
if __warn__:
warnings.warn(
"The concrete concept of a view has been deprecated. You want to "
- "use `getSiteManager(context).adapters.lookup(map(providedBy, "
- "(object, request)), IDefaultViewName)",
+ "use `zapi.getDefaultViewName()` instead.",
DeprecationWarning, warningLevel())
view = queryDefaultViewName(object, request, context=context)
if view is not None:
@@ -193,8 +192,7 @@
if __warn__:
warnings.warn(
"The concrete concept of a view has been deprecated. You want to "
- "use `getSiteManager(context).adapters.lookup(map(providedBy, "
- "(object, request)), IDefaultViewName)`",
+ "use `zapi.queryDefaultViewName()` instead.",
DeprecationWarning, warningLevel())
from zope.component.bbb.exceptions import ComponentLookupError
from zope.component import getSiteManager
Modified: Zope3/trunk/src/zope/component/bbb/interfaces.py
===================================================================
--- Zope3/trunk/src/zope/component/bbb/interfaces.py 2005-09-24 22:04:08 UTC (rev 38605)
+++ Zope3/trunk/src/zope/component/bbb/interfaces.py 2005-09-24 22:35:29 UTC (rev 38606)
@@ -331,7 +331,10 @@
"stands in" for the user.
"""
-
+# When this code is removed, this needs to be undeprecated and moved
+# towards a private interface somewhere in zope.app.publisher. In
+# effect the Zope 3 core is still using IDefaultViewName at present,
+# even though it's in bbb.
class IDefaultViewName(Interface):
"""A string that contains the default view name
More information about the Zope3-Checkins
mailing list