Transactions should support the context handler interface
|Reported by:||kcarnold||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Cc:||kenneth.arnold@…||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Python 2.5 (really 2.6) introduces a with statement (http://www.python.org/dev/peps/pep-0343/).
It would be nice for transactions to support that, so a casual transaction use doesn't require creating a "dummy" function just to wrap it with a decorator.
This can be done entirely backwards-compatibly by adding __enter__ and __exit__ functions.
Change History (5)
comment:1 Changed 6 years ago by mir
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Design decision needed