[Zope3-checkins] SVN: Zope3/branches/stephan_and_jim-response-refactor/src/zope/publisher/http.py Added backward compatibility for old construction api

Jim Fulton jim at zope.com
Fri Sep 2 17:16:31 EDT 2005


Log message for revision 38266:
  Added backward compatibility for old construction api
  

Changed:
  U   Zope3/branches/stephan_and_jim-response-refactor/src/zope/publisher/http.py

-=-
Modified: Zope3/branches/stephan_and_jim-response-refactor/src/zope/publisher/http.py
===================================================================
--- Zope3/branches/stephan_and_jim-response-refactor/src/zope/publisher/http.py	2005-09-02 21:16:28 UTC (rev 38265)
+++ Zope3/branches/stephan_and_jim-response-refactor/src/zope/publisher/http.py	2005-09-02 21:16:30 UTC (rev 38266)
@@ -235,7 +235,17 @@
 
     retry_max_count = 3    # How many times we're willing to retry
 
-    def __init__(self, body_instream, environ, response=None):
+    def __init__(self, body_instream, environ, response=None, bbb=None):
+        # XXX BBB
+        try:
+            environ.get
+        except AttributeError:
+            import warnings
+            warnings.warn("Can't pass output streams to requests anymore",
+                          DeprecationWarning,
+                          2)
+            environ, response = response, bbb
+            
         super(HTTPRequest, self).__init__(body_instream, environ, response)
 
         self._orig_env = environ



More information about the Zope3-Checkins mailing list