Re: [ZODB-Dev] ZODB 3.8.0a1 released
You would now use transaction.savepoint(True). Note also that you don't need to abort a subtransaction or optimistic savepoint, it will be aborted/committed as part of the full transaction. Stefan On 12. Mai 2007, at 19:00, Paul Winkler wrote: I belatedly realized I have some old test code that uses a subtransaction hack to get a _p_jar and _p_oid: try: transaction.commit(1) # do something needing _p_jar or _p_oid finally: transaction.abort(1) -- It doesn't necessarily do it in chronological order, though. --Douglas Adams ___ 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] ZODB 3.8.0a1 released
I've releases ZODB 3.8.0a1 tp PyPI: http://www.python.org/pypi/ZODB3/3.8.0a1 To see what's in 3.8.0, see the news file: http://svn.zope.org/ZODB/trunk/NEWS.txt?rev=75692view=auto This also includes the recent storage API standardization's, removal of subtransactions, and deprecation of versions. I should have included that in the NEWS file. I'll fix that for the next release. Jim -- Jim Fulton mailto:[EMAIL PROTECTED]Python Powered! CTO (540) 361-1714 http://www.python.org Zope Corporationhttp://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] ZODB 3.8.0a1 released
On Sat, May 12, 2007 at 10:44:34AM -0400, Jim Fulton wrote: I've releases ZODB 3.8.0a1 tp PyPI: http://www.python.org/pypi/ZODB3/3.8.0a1 To see what's in 3.8.0, see the news file: http://svn.zope.org/ZODB/trunk/NEWS.txt?rev=75692view=auto This also includes the recent storage API standardization's, removal of subtransactions, and deprecation of versions. I should have included that in the NEWS file. I'll fix that for the next release. I belatedly realized I have some old test code that uses a subtransaction hack to get a _p_jar and _p_oid: try: transaction.commit(1) # do something needing _p_jar or _p_oid finally: transaction.abort(1) What's the correct thing to do now? Are savepoints relevant for this (ab)use? I don't think this idiom was ever formally documented, it was just an informal hack that I picked up somewhere (I forget from whom). -- Paul Winkler http://www.slinkp.com ___ 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] ZODB 3.8.0a1 released
On May 12, 2007, at 1:00 PM, Paul Winkler wrote: On Sat, May 12, 2007 at 10:44:34AM -0400, Jim Fulton wrote: I've releases ZODB 3.8.0a1 tp PyPI: http://www.python.org/pypi/ZODB3/3.8.0a1 To see what's in 3.8.0, see the news file: http://svn.zope.org/ZODB/trunk/NEWS.txt?rev=75692view=auto This also includes the recent storage API standardization's, removal of subtransactions, and deprecation of versions. I should have included that in the NEWS file. I'll fix that for the next release. I belatedly realized I have some old test code that uses a subtransaction hack to get a _p_jar and _p_oid: try: transaction.commit(1) # do something needing _p_jar or _p_oid finally: transaction.abort(1) What's the correct thing to do now? You can create a savepoint or you can use the connection add method to give a new object a _p_jar and _p_oid before a commit. (There are cases where the object of interest isn't handy and using a savepoint if more convenient.) Are savepoints relevant for this (ab)use? Yes I don't think this idiom was ever formally documented, it was just an informal hack that I picked up somewhere (I forget from whom). I've used this trick with savepoints. Jim -- Jim Fulton mailto:[EMAIL PROTECTED]Python Powered! CTO (540) 361-1714 http://www.python.org Zope Corporationhttp://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