[Zope-Checkins] CVS: Zope/lib/python/ZPublisher -
Iterators.py:1.1.4.2
Paul Winkler
pw_lists at slinkp.com
Thu Apr 8 12:00:04 EDT 2004
Update of /cvs-repository/Zope/lib/python/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv24863
Modified Files:
Tag: Zope-2_7-branch
Iterators.py
Log Message:
Adding Shane's warning re. not using the ZODB to docstring.
=== Zope/lib/python/ZPublisher/Iterators.py 1.1.4.1 => 1.1.4.2 ===
--- Zope/lib/python/ZPublisher/Iterators.py:1.1.4.1 Sun Mar 28 06:11:48 2004
+++ Zope/lib/python/ZPublisher/Iterators.py Thu Apr 8 12:00:03 2004
@@ -1,11 +1,25 @@
from Interface import Interface
class IStreamIterator(Interface):
+ """
+ An iterator that can be published.
+
+ IStreamIterators must not read from the object database.
+ After the application finishes interpreting a request and
+ returns an iterator to be processed asynchronously, it closes
+ the ZODB connection. If the iterator then tries to load some
+ ZODB object, ZODB would do one of two things. If the connection
+ is still closed, ZODB would raise an error. If the connection
+ happens to be re-opened by another thread, ZODB might allow it,
+ but it has a chance of going insane if it happens to be loading
+ or storing something in the other thread at the same time. """
+
def next(self):
"""
Return a sequence of bytes out of the bytestream, or raise
StopIeration if we've reached the end of the bytestream.
"""
+
class filestream_iterator(file):
"""
a file subclass which implements an iterator that returns a
More information about the Zope-Checkins
mailing list