This package defines the parameterless function add_abort_hooks which patches transaction to support (before and after) abort hooks.
The support is analogous to that of before commit hooks. Especially, transaction._transaction.Transaction gets two new methods addBeforeAbortHook and addAfterAbortHook analoguous to addBeforeCommitHook with identical signature. The hooks are called at the begin or end, respectively, of Transaction.abort().
Note that the abort hooks are not called when the transaction is internally aborted during a transaction commit. In this case, the after commit hooks are called (with False as first parameter). Therefore, it is likely that you will register a corresponding pair of abort hook and after commit hook. In fact, I had expected that the after commit hooks would be called during abort as well, but the ZODB developers decided that not calling them on abort is a feature, not a bug.
Metadata
Release files for dm.transaction.aborthook 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dm.transaction.aborthook-1.0.tar.gz | 2.9 kB | Without provenance | Details for dm.transaction.aborthook-1.0.tar.gz |
Release files / dm.transaction.aborthook-1.0.tar.gz
| Download URL | dm.transaction.aborthook-1.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30def72f7eb2a70a9ea6dbdf9674e2757b51550e1763238a4210fe0394228e77
|
|
BLAKE2b-256 checksum How to use checksums |
71f29b1ea855984fc71813f0c99df2bc331ed15984d47bd630d9de15e102facd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for dm.transaction.aborthook 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.