[Zope3-dev] Re: [Zope3-checkins] CVS: Zope3/lib/python/Transaction - Manager.py:1.1 Transaction.py:1.1 IDataManager.py:1.3 ITransaction.py:1.3 __init__.py:1.3 _defaultTransaction.py:1.5

Patrick K. O'Brien pobrien@orbtech.com
Mon, 29 Jul 2002 07:37:29 -0500


A minimal implementation of True and False were added to 2.2.1 to grease the
skids:

Welcome To PyCrust 0.7.2 - The Flakiest Python Shell
Sponsored by Orbtech - Specializing in Python Application Development
Python 2.2.1 (#34, Apr  9 2002, 19:34:33) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
Startup script executed: C:\Code\.pythonrc.py
>>> True
1
>>> False
0
>>>

--
Patrick K. O'Brien
Orbtech
-----------------------------------------------
"Your source for Python programming expertise."
-----------------------------------------------
Web:  http://www.orbtech.com/web/pobrien/
Blog: http://www.orbtech.com/blog/pobrien/
Wiki: http://www.orbtech.com/wiki/PatrickOBrien
-----------------------------------------------

> -----Original Message-----
> From: zope3-dev-admin@zope.org [mailto:zope3-dev-admin@zope.org]On
> Behalf Of Gary Poster
> Sent: Sunday, July 28, 2002 10:55 PM
> To: zope3-dev@zope.org
> Subject: [Zope3-dev] Re: [Zope3-checkins] CVS:
> Zope3/lib/python/Transaction - Manager.py:1.1 Transaction.py:1.1
> IDataManager.py:1.3 ITransaction.py:1.3 __init__.py:1.3
> _defaultTransaction.py:1.5
>
>
> So...we've got True and False in here....so I guess we're only supposed to
> run Zope3 on Python CVS now (which I assume has a boolean type
> and constants
> now)?  Or am I missing something obvious?
>
> Gary
>
>
> > === Added File Zope3/lib/python/Transaction/Manager.py ===
> > from IDataManager import IRollback
> > from Transaction import Transaction, Status
> >
> > # XXX need to change asserts of transaction status into explicit checks
> > # that raise some exception
> >
> > # XXX need lots of error checking
> >
> > class TransactionManager(object):
> >
> >     txn_factory = Transaction
> >
> >     def __init__(self):
> >         pass
> >
> >     def new(self):
> >         return self.txn_factory(self)
> >
> >     def commit(self, txn):
> >         assert txn._status is Status.ACTIVE
> >         prepare_ok = True
> >         for r in txn._resources:
> >             if prepare_ok and not r.prepare(txn):
> >                 prepare_ok = False
> ...
>
>
> _______________________________________________
> Zope3-dev mailing list
> Zope3-dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope3-dev