Log message for revision 121895:
  - re-added 'extra' argument (someone was missing it)

Changed:
  U   Zope/branches/2.13/doc/CHANGES.rst
  U   Zope/branches/2.13/src/Testing/ZopeTestCase/functional.py

-=-
Modified: Zope/branches/2.13/doc/CHANGES.rst
===================================================================
--- Zope/branches/2.13/doc/CHANGES.rst  2011-06-08 14:59:27 UTC (rev 121894)
+++ Zope/branches/2.13/doc/CHANGES.rst  2011-06-08 15:29:04 UTC (rev 121895)
@@ -11,6 +11,9 @@
 Bugs Fixed
 ++++++++++
 
+- Testing: Re-added 'extra' argument to Functional.publish.
+  Removing it in Zope 2.13.0a1 did break backwards compatibility.
+
 - LP #787541: Fix WSGIPublisher to close requests on abort unconditionally.
   Previously an addAfterCommitHook was used, but this is not run on transaction
   aborts.  Now a Synchronizer is used which unconditionally closes the request

Modified: Zope/branches/2.13/src/Testing/ZopeTestCase/functional.py
===================================================================
--- Zope/branches/2.13/src/Testing/ZopeTestCase/functional.py   2011-06-08 
14:59:27 UTC (rev 121894)
+++ Zope/branches/2.13/src/Testing/ZopeTestCase/functional.py   2011-06-08 
15:29:04 UTC (rev 121895)
@@ -53,11 +53,12 @@
     implements(interfaces.IFunctional)
 
     @savestate
-    def publish(self, path, basic=None, env=None, request_method='GET',
-                stdin=None, handle_errors=True):
+    def publish(self, path, basic=None, env=None, extra=None,
+                request_method='GET', stdin=None, handle_errors=True):
         '''Publishes the object at 'path' returning a response object.'''
 
         from StringIO import StringIO
+        from ZPublisher.Request import Request
         from ZPublisher.Response import Response
         from ZPublisher.Publish import publish_module
 
@@ -66,6 +67,8 @@
 
         if env is None:
             env = {}
+        if extra is None:
+            extra = {}
 
         request = self.app.REQUEST
 
@@ -89,12 +92,14 @@
 
         outstream = StringIO()
         response = Response(stdout=outstream, stderr=sys.stderr)
+        request = Request(stdin, env, response)
+        for k, v in extra.items():
+            request[k] = v
 
         publish_module('Zope2',
+                       debug=not handle_errors,
+                       request=request,
                        response=response,
-                       stdin=stdin,
-                       environ=env,
-                       debug=not handle_errors,
                       )
 
         return ResponseWrapper(response, outstream, path)

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to