[Checkins] [zopefoundation/transaction] 36f634: Transaction._free drops more references, and Trans...

Jason Madden noreply at github.com
Thu Sep 5 17:35:58 CEST 2019


  Branch: refs/heads/issue82
  Home:   https://github.com/zopefoundation/transaction
  Commit: 36f6344d75a597faa1956d254abee48c48e7a8f9
      https://github.com/zopefoundation/transaction/commit/36f6344d75a597faa1956d254abee48c48e7a8f9
  Author: Jason Madden <jamadden at gmail.com>
  Date:   2019-09-05 (Thu, 05 Sep 2019)

  Changed paths:
    M CHANGES.rst
    M docs/hooks.rst
    M transaction/_transaction.py
    M transaction/tests/test__transaction.py

  Log Message:
  -----------
  Transaction._free drops more references, and Transaction.abort() is a little safer.

Specifically, free the manager and synchronizers, plus a few other
dictionaries that could be arbitrary size and contain arbitrary data.

And abort() always invokes _free() even in the case of exceptions.
commit() still doesn't so that the synchronizers are available for the
expected abort().

But take care about when and how abort frees its manager: not only
does this preserve backwards compatibility, but it lets it be
safe to abort a transaction object more than once. A happy side-effect
of only freeing the manager there is that synchronizers can access
data they set in afterCompletion().

>From discussion in #82




More information about the checkins mailing list