[ZODB-Dev] Re: [Zodb-checkins] SVN: ZODB/branches/3.4/src/ Added savepoints!

2005-04-25 Thread Jim Fulton
Florent Guillaume wrote:
+Transactions
+
+
+Transactions now support savepoints.  Savepoints allow changes to be
+periodically be checkpointed within a transaction.  You can then
+rollback to a previously created savepoint.  See
+transaction/savepoint.txt.

Awesome. That's really nice to have, thanks.
A detail I saw:

+class IDataManager(zope.interface.Interface):
[...]
+def tpc_begin(transaction):
+Begin commit of a transaction, starting the two-phase commit.
+
+transaction is the ITransaction instance associated with the
+transaction being committed.
+
+subtransaction is a Boolean flag indicating whether the
+two-phase commit is being invoked for a subtransaction.
+
+Important note: Subtransactions are modelled in the sense that
+when you commit a subtransaction, subsequent commits should be
+for subtransactions as well.  That is, there must be a
+commit_sub() call between a tpc_begin() call with the
+subtransaction flag set to true and a tpc_begin() with the
+flag set to false.
+
+

But there's not subtransaction flag for this method anymore.
Right.  Are you worried that this is a backward compatibility issue?
This is a point that I didn't think of.  However, I wonder if this
will be a problem.  Many old data managers seem to accept a single
argument.  It's hard to imagine someone actualy writing a data
manager that supports subtransactions.
Perhaps we need to send a query to zodb-dev and zope-dev.
Jim
--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/
ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


[ZODB-Dev] Re: [Zodb-checkins] SVN: ZODB/branches/3.4/src/ Added savepoints!

2005-04-25 Thread Florent Guillaume
Jim Fulton wrote:
 +def tpc_begin(transaction):
 +Begin commit of a transaction, starting the two-phase
 commit.
 +
 +transaction is the ITransaction instance associated with the
 +transaction being committed.
 +
 +subtransaction is a Boolean flag indicating whether the
 +two-phase commit is being invoked for a subtransaction.
 +
 +Important note: Subtransactions are modelled in the sense that
 +when you commit a subtransaction, subsequent commits should be
 +for subtransactions as well.  That is, there must be a
 +commit_sub() call between a tpc_begin() call with the
 +subtransaction flag set to true and a tpc_begin() with the
 +flag set to false.
 +
 +

 But there's not subtransaction flag for this method anymore.
 
 Right.  Are you worried that this is a backward compatibility issue?

No no, I was just worried about the inconsistency between the signature,
that has no 'subtransaction' arg, and the docstring that talks about one.

Florent

 This is a point that I didn't think of.  However, I wonder if this
 will be a problem.  Many old data managers seem to accept a single
 argument.  It's hard to imagine someone actualy writing a data
 manager that supports subtransactions.
 
 Perhaps we need to send a query to zodb-dev and zope-dev.


-- 
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of RD
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


[ZODB-Dev] Re: [Zodb-checkins] SVN: ZODB/branches/3.4/src/ Added savepoints!

2005-04-25 Thread Jim Fulton
Florent Guillaume wrote:
Jim Fulton wrote:
+def tpc_begin(transaction):
+Begin commit of a transaction, starting the two-phase
commit.
+
+transaction is the ITransaction instance associated with the
+transaction being committed.
+
+subtransaction is a Boolean flag indicating whether the
+two-phase commit is being invoked for a subtransaction.
+
+Important note: Subtransactions are modelled in the sense that
+when you commit a subtransaction, subsequent commits should be
+for subtransactions as well.  That is, there must be a
+commit_sub() call between a tpc_begin() call with the
+subtransaction flag set to true and a tpc_begin() with the
+flag set to false.
+
+
But there's not subtransaction flag for this method anymore.
Right.  Are you worried that this is a backward compatibility issue?

No no, I was just worried about the inconsistency between the signature,
that has no 'subtransaction' arg, and the docstring that talks about one.
Ah, I missed that.  I'll fix that.
Jim
--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/
ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] Re: [Zodb-checkins] SVN: ZODB/branches/3.4/

2005-04-14 Thread Jeremy Hylton
On 4/14/05, Tim Peters [EMAIL PROTECTED] wrote:
 Beats me -- the ZEO version number has been one less than the
 corresponding ZODB version number (e.g., if ZODB is 6.7.8q12, ZEO is
 5.7.8q12) as far back as my knowledge goes, and I can't find an explanation.

The version number got added when we moved to ZEO 2 IIRC.  At the same
time, I started incrementing the minor version number along with the
ZODB minor version number, because they were always released in
tandem.

 Does anyone object to my changing the ZEO version number to match the ZODB
 version number?  Concretely, that means:
 
 import ZODB
 import ZEO
 assert ZODB.__version__ == ZEO.version
 
 would no longer fail.

+1

 I've seen code and docs that actually reference ZEO.version (and why that
 isn't spelled __version__ is also unknown to me), 

Because of silly developer preferences.  I don't like to use an
__variable__ unless that __variable__ has an actual meaning to the
Python interpreter.  The __variable__ namespace is supposed to be
reserved for Python (sort of like names beginning with _P are reserved
in std C).  Also, it's not a private variable, so I didn't see any
point to have any underscores in it.

 There's also a file, ZEO/version.txt, that repeats the ZEO version number
 (ZEO.version is set up by ZEO/__init__.py).  I have no idea why that exists
 either.  Does any one here use ZEO/version.txt?

Someone asked for it so that it would be easy to check the version of
ZEO from a shell script.

Jeremy
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev