Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

Transaction management for Python

Project description

This package contains a generic transaction implementation for Python. It is mainly used by the ZODB.

See for narrative documentation on its usage.


1.3.0 (2012-05-16)

  • Added Sphinx API docuementation.
  • Added explicit support for PyPy.
  • Dropped use of Python3-impatible zope.interface.implements class advisor in favor of zope.interface.implementer class decorator.
  • Added support for continuous integration using tox and jenkins.
  • Added docs alias (installs Sphinx and dependencies).
  • Added dev alias (runs develop plus installs nose and coverage).
  • Python 3.3 compatibility.
  • Fix “for attempt in transaction.attempts(x)” machinery, which would not retry a transaction if its implicit call to .commit() itself raised a transient error. Symptom: seeing conflict errors even though you thought you were retrying some number of times via the “attempts” machinery (the first attempt to generate an exception during commit would cause that exception to be raised).

1.2.0 (2011-12-05)

New Features:

  • Python 3.2 compatibility.
  • Dropped Python 2.4 and 2.5 compatibility (use 1.1.1 if you need to use “transaction” under these Python versions).

1.1.1 (2010-09-16)

Bug Fixes:

  • Code in held on to local references to traceback objects after calling sys.exc_info() to get one, causing potential reference leakages.
  • Fixed hexlify NameError in transaction._transaction.oid_repr and add test.

1.1.0 (1010-05-12)

New Features:

  • Transaction managers and the transaction module can be used with the with statement to define transaction boundaries, as in:

    with transaction:
        ... do some things ...

    See transaction/tests/convenience.txt for more details.

  • There is a new iterator function that automates dealing with transient errors (such as ZODB confict errors). For example, in:

    for attempt in transaction.attempts(5):
        with attempt:
            ... do some things ..

    If the work being done raises transient errors, the transaction will be retried up to 5 times.

    See transaction/tests/convenience.txt for more details.

Bugs fixed:

1.0.1 (2010-05-07)

  • LP #142464: remove double newline between log entries: it makes doing smarter formatting harder.
  • Updated tests to remove use of deprecated zope.testing.doctest.

1.0.0 (2009-07-24)

  • Fix test that incorrectly relied on the order of a list that was generated from a dict.
  • Remove crufty DEPENDENCIES.cfg left over from zpkg.

1.0a1 (2007-12-18)

= Initial release, branched from ZODB trunk on 2007-11-08 (aka
  • Remove (deprecated) support for beforeCommitHook alias to addBeforeCommitHook.
  • Add weakset tests.
  • Remove unit tests that depend on ZODB.tests.utils from test_transaction (these are actually integration tests).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
transaction-1.3.0.tar.gz (49.6 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page