[Zope3-checkins] CVS: Zope3/src/zope/publisher - browser.py:1.25 http.py:1.40

Jim Fulton jim at zope.com
Sat Mar 6 11:50:40 EST 2004


Update of /cvs-repository/Zope3/src/zope/publisher
In directory cvs.zope.org:/tmp/cvs-serv11249/src/zope/publisher

Modified Files:
	browser.py http.py 
Log Message:
Converted most getAdapter calls to use interface calls instead.


=== Zope3/src/zope/publisher/browser.py 1.24 => 1.25 ===
--- Zope3/src/zope/publisher/browser.py:1.24	Fri Feb 27 12:50:27 2004
+++ Zope3/src/zope/publisher/browser.py	Sat Mar  6 11:50:39 2004
@@ -31,7 +31,6 @@
 from zope.publisher.interfaces.browser import IBrowserApplicationRequest
 
 from zope.publisher.interfaces.browser import IBrowserView
-from zope.component import getAdapter
 from zope.publisher.http import HTTPRequest, HTTPResponse
 from zope.publisher.base import BaseRequest
 
@@ -255,7 +254,7 @@
     def _decode(self, text):
         """Try to decode the text using one of the available charsets."""
         if self.charsets is None:
-            envadapter = getAdapter(self, IUserPreferredCharsets)
+            envadapter = IUserPreferredCharsets(self)
             self.charsets = envadapter.getPreferredCharsets()
         for charset in self.charsets:
             try:


=== Zope3/src/zope/publisher/http.py 1.39 => 1.40 ===
--- Zope3/src/zope/publisher/http.py:1.39	Thu Feb  5 17:52:35 2004
+++ Zope3/src/zope/publisher/http.py	Sat Mar  6 11:50:39 2004
@@ -22,7 +22,6 @@
 from cgi import escape
 
 from zope.interface import implements
-from zope.component import getAdapter
 
 from zope.publisher.interfaces.http import IHTTPCredentials
 from zope.publisher.interfaces.http import IHTTPRequest
@@ -510,7 +509,7 @@
         # the source for setAuthUserName, we had to stub that in
         # several tests.
         if self.response.http_transaction is not None:
-            logging_info = getAdapter(user, ILoggingInfo)
+            logging_info = ILoggingInfo(user)
             message = logging_info.getLogMessage()
             self.response.http_transaction.setAuthUserName(message)
 




More information about the Zope3-Checkins mailing list