Allow commit_veto hook to be specified within Paste config, ala:
[filter:tm]
use = repoze.tm:make_tm
commit_veto = some.package:myfunction
myfunction should take three args: environ, status, headers and should return True if the txn should be aborted, False if it should be committed.
Initial PyPI release.
- after_end.register and after_end.unregister must now be passed a transaction object rather than a WSGI environment to avoid the possibility that the WSGI environment used by a child participating in transaction management won’t be the same one used by the repoze.tm package.
- repoze.tm now inserts a key into the WSGI environment (repoze.tm.active) if it’s active in the WSGI pipeline. An API function, repoze.tm:isActive can be called with a single argument, the WSGI environment, to check if the middleware is active.