[Checkins] SVN: zope.app.http/trunk/src/zope/app/http/ Substitute zope.app.zapi by direct calls to its wrapped apis. See bug 219302

Lorenzo Gil lgs at sicem.biz
Tue Apr 22 15:25:25 EDT 2008


Log message for revision 85611:
  Substitute zope.app.zapi by direct calls to its wrapped apis. See bug 219302

Changed:
  U   zope.app.http/trunk/src/zope/app/http/exception/methodnotallowed.py
  U   zope.app.http/trunk/src/zope/app/http/options.py

-=-
Modified: zope.app.http/trunk/src/zope/app/http/exception/methodnotallowed.py
===================================================================
--- zope.app.http/trunk/src/zope/app/http/exception/methodnotallowed.py	2008-04-22 18:50:22 UTC (rev 85610)
+++ zope.app.http/trunk/src/zope/app/http/exception/methodnotallowed.py	2008-04-22 19:25:24 UTC (rev 85611)
@@ -13,8 +13,8 @@
 
 $Id$
 """
+from zope.component import getAdapters
 from zope.interface import Interface
-from zope.app import zapi
 from zope.app.publication.http import IMethodNotAllowed
 
 
@@ -28,7 +28,7 @@
         self.request = request
         self.allow = [
             name for name, adapter
-            in zapi.getAdapters((error.object, error.request), Interface)
+            in getAdapters((error.object, error.request), Interface)
             if hasattr(adapter, name)]
         self.allow.sort()
 

Modified: zope.app.http/trunk/src/zope/app/http/options.py
===================================================================
--- zope.app.http/trunk/src/zope/app/http/options.py	2008-04-22 18:50:22 UTC (rev 85610)
+++ zope.app.http/trunk/src/zope/app/http/options.py	2008-04-22 19:25:24 UTC (rev 85611)
@@ -1,7 +1,7 @@
 ##############################################################################
 # Copyright (c) 2003 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
@@ -20,7 +20,7 @@
            'COPY', 'MOVE', 'LOCK', 'UNLOCK', 'TRACE']
            # 'GET', 'HEAD', 'POST' are always available. See OPTIONS() method.
 
-from zope.app import zapi
+from zope.component import queryMultiAdapter
 
 class OPTIONS(object):
     """`OPTIONS` handler for all objects
@@ -36,7 +36,7 @@
         # interfaces for HTTP methods. This way we can even list verbs that
         # are not in the lists above.
         for m in _allowed_methods:
-            view = zapi.queryMultiAdapter((self.context, self.request), name=m)
+            view = queryMultiAdapter((self.context, self.request), name=m)
             if view is not None:
                 allowed.append(m)
 



More information about the Checkins mailing list