[Zope3-dev] Important Heads Up: I'm making IResult private

Chris McDonough chrism at plope.com
Sun Dec 25 10:02:11 EST 2005


FWIW, It would be nice to have some API to return large amounts of  
content which doesn't live in ZODB without returning an *actual* file  
object.  A real world use case: In a Zope2 application, I depend on  
being able to return  a "streamiterator" which does decryption as it  
streams.  I cannot write this data temporarily to disk for business  
reasons (it's encrypted for a reason), so I wrap a file pointer in  
something that implements a stream iterator; it decrypts as it's  
iterated.

I don't know if you have this in mind still.

- C


On Dec 23, 2005, at 12:13 PM, Jim Fulton wrote:

>
> I've been working on trying to clean up the IResult/response.write  
> mess.
> I want to retract IResult from the public API.
>
> Here's what I propose to do:
>
> - Move IResult from zope.publisher.interfaces.http to
>   zope.publisher.http, thus making it a private interface.
>
> - I'm arranging that a published method can simply return a file,
>   rather than a string. This will be how you can efficiently
>   return large results.
>
> - I will provide a documentation file that will be available in
>   apidoc that describes this.
>
> - Attempts to use response.write will point to that
>   documentation.  I am still confident that this will
>   not cause a backward compatibility problem.
>
> Note:
>
> - Previous versions of Zope 3 supported neither efficient handling
>   of larger output nor streaming.
>
> - Zope 3.2 will provide efficient handling of large results via
>   both Twisted and zope.server.  It will not provide streaming.
>
> We will revisit all of this in the next release cycle, although I am
> confident that simply returning strings or files should be supported
> indefinately.
>
> If there are strong objections, let me know ASAP, but I think this is
> the lowest risk option.
>
> Jim
>
> -- 
> Jim Fulton           mailto:jim at zope.com       Python Powered!
> CTO                  (540) 361-1714            http://www.python.org
> Zope Corporation     http://www.zope.com       http://www.zope.org
> _______________________________________________
> Zope3-dev mailing list
> Zope3-dev at zope.org
> Unsub: http://mail.zope.org/mailman/options/zope3-dev/chrism% 
> 40plope.com
>



More information about the Zope3-dev mailing list