[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication - ZopePublication.py:1.8
Jeremy Hylton
jeremy@zope.com
Thu, 18 Jul 2002 12:05:09 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication
In directory cvs.zope.org:/tmp/cvs-serv19797/Zope/App/ZopePublication
Modified Files:
ZopePublication.py
Log Message:
Import get_transaction() from Transaction.
XXX I'm not sure if the change in ZopePublication.py is correct,
because it was merely testing for the presence of get_transaction() in
builtins. Since that behavior is going away, I'm not sure if it
should always import get_transaction() or always use its stub
implementations. The former makes more sense.
=== Zope3/lib/python/Zope/App/ZopePublication/ZopePublication.py 1.7 => 1.8 ===
from Zope.Proxy.ContextWrapper import ContextWrapper
+# XXX Should this be imported here?
+from Transaction import get_transaction
+
class RequestContainer:
# TODO: add security assertion declaring access to REQUEST
@@ -54,14 +57,6 @@
class Cleanup:
def __init__(self, f):
self.__del__ = f
-
-
-try: get_transaction
-except NameError:
- class get_transaction:
- def abort(self): pass
- def begin(self): pass
- def commit(self): pass
class ZopePublication(object, PublicationTraverse, DefaultPublication):