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

Jason Madden noreply at github.com
Mon Dec 9 19:58:17 CET 2019


  Branch: refs/heads/master
  Home:   https://github.com/zopefoundation/transaction
  Commit: e4891ebbd1cd66696b4e08bcfe2bc1b7d07037d9
      https://github.com/zopefoundation/transaction/commit/e4891ebbd1cd66696b4e08bcfe2bc1b7d07037d9
  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


  Commit: ec1ceec3a9d33052d6812a6c84bb217b0d2b02f5
      https://github.com/zopefoundation/transaction/commit/ec1ceec3a9d33052d6812a6c84bb217b0d2b02f5
  Author: Jason Madden <jamadden at gmail.com>
  Date:   2019-12-09 (Mon, 09 Dec 2019)

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

  Log Message:
  -----------
  Merge pull request #84 from zopefoundation/issue82

Transaction._free drops more references, and Transaction.abort() is a bit safer


Compare: https://github.com/zopefoundation/transaction/compare/8b24cc3cba74...ec1ceec3a9d3


More information about the checkins mailing list