[Zope3-checkins]
SVN: Zope3/trunk/src/zope/app/component/metaconfigure.py
Deprecated the non-functional defaultLayer directive. Also made it
Jim Fulton
jim at zope.com
Mon Dec 5 11:17:07 EST 2005
Log message for revision 40545:
Deprecated the non-functional defaultLayer directive. Also made it
work less hard at being non-functional. ;)
Changed:
U Zope3/trunk/src/zope/app/component/metaconfigure.py
-=-
Modified: Zope3/trunk/src/zope/app/component/metaconfigure.py
===================================================================
--- Zope3/trunk/src/zope/app/component/metaconfigure.py 2005-12-05 16:17:04 UTC (rev 40544)
+++ Zope3/trunk/src/zope/app/component/metaconfigure.py 2005-12-05 16:17:06 UTC (rev 40545)
@@ -320,8 +320,6 @@
factory = proxyResource
if layer is None:
- layer = zapi.queryAdapter(type, IInterface, 'defaultLayer')
- if layer is None:
layer = type
_context.action(
@@ -392,8 +390,6 @@
return factories[-1](ob, request)
# if layer not specified, use default layer for type
- if layer is None:
- layer = zapi.queryAdapter(type, IInterface, 'defaultLayer')
if layer is not None:
for_ = for_ + (layer,)
else:
@@ -458,10 +454,9 @@
############################################################################
def defaultLayer(_context, type, layer):
- _context.action(
- discriminator=('defaultLayer', type, layer),
- callable=handler,
- args = ('provideAdapter',
- (type,), IInterface, 'defaultLayer',
- lambda request: layer, _context.info)
- )
+ import warnings
+ warnings.warn("""The defaultLayer directive is deprecated and will
+go away in Zope 3.4. It doesn't actually do anything, and never did.
+
+(%s)
+""" % _context.info, DeprecationWarning)
More information about the Zope3-Checkins
mailing list