[ZCM] [ZC] 1965/ 5 Edit "get_transaction() doesn't work in Zope 2.9"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Mon Dec 12 10:02:30 EST 2005


Issue #1965 Update (Edit) "get_transaction() doesn't work in Zope 2.9"
 Status Pending, Zope/bug critical
To followup, visit:
  http://www.zope.org/Collectors/Zope/1965

==============================================================
= Edit - Entry #5 by tseaver on Dec 12, 2005 10:02 am

 Changes: submitter email, edited transcript, new comment

tidy line wrapping
________________________________________
= Comment - Entry #4 by tim_one on Dec 11, 2005 3:35 pm

Yup, get_transaction() was officially deprecated in ZODB 3.4, and removed in ZODB 3.6 (which Zope 2.9 uses).  From ZODB 3.6 news:

"""
Removal of Features Deprecated in ZODB 3.4
------------------------------------------

(3.6b2) ZODB 3.6 no longer contains features officially deprecated in the ZODB 3.4 release.  These include:

- ``get_transaction()``.  Use ``transaction.get()`` instead.  ``transaction.commit()`` is a shortcut spelling of ``transaction.get().commit()``, and ``transaction.abort()`` of ``transaction.get().abort()``.  Note that importing ZODB no longer installs ``get_transaction`` as a name in Python's ``__builtin__`` module either.

- The ``begin()`` method of ``Transaction`` objects.  Use the ``begin()`` method of a transaction manager instead.  ``transaction.begin()`` is a shortcut spelling to call the default transaction manager's ``begin()`` method.

- The ``dt`` argument to ``Connection.cacheMinimize()``.

- The ``Connection.cacheFullSweep()`` method.  Use ``cacheMinimize()`` instead.

- The ``Connection.getTransaction()`` method.  Pass a transaction manager to ``DB.open()`` instead.

- The ``Connection.getLocalTransaction()`` method.  Pass a transaction manager to ``DB.open()`` instead.

- The ``cache_deactivate_after`` and ``version_cache_deactivate_after`` arguments to the ``DB`` constructor.

- The ``temporary``, ``force``, and ``waitflag`` arguments to ``DB.open()``.  ``DB.open()`` no longer blocks (there's no longer a fixed limit on the number of open connections).

- The ``transaction`` and ``txn_mgr``arguments to ``DB.open()``.  Use the ``transaction_manager`` argument instead.

- The ``getCacheDeactivateAfter``, ``setCacheDeactivateAfter``, ``getVersionCacheDeactivateAfter`` and ``setVersionCacheDeactivateAfter`` methods of ``DB``.
"""

________________________________________
= Assign - Entry #3 by tseaver on Dec 11, 2005 3:03 pm

 Status: Accepted => Pending

 Supporters removed: tim_one

Shouldn't be in ZODB -- let's put the BBB cruft in the Zope2
package, instead (since ZODB published its deprectaion warnings
cleanly, and did what it promised).

Removing Tim as I don't believe we should touch ZODB at all for
this.
________________________________________
= Assign - Entry #2 by ajung on Dec 11, 2005 1:35 pm

 Status: Pending => Accepted

 Supporters added: tim_one

I think we must restore the functionality for Zope 2.9 b2. 
We should remove it in Zope 2.10 or 2.11.
________________________________________
= Request - Entry #1 by morphex on Dec 11, 2005 12:21 pm

Using get_transaction() fails (raises a NameError)
==============================================================



More information about the Zope-Collector-Monitor mailing list