Opened 16 years ago
Closed 14 years ago
#7874 closed New feature (fixed)
Transactions should support the context handler interface
Reported by: | Kenneth Arnold | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | kenneth.arnold@… | Triage Stage: | Design decision needed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
(Low-priority, post-1.0)
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 by , 16 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:2 by , 16 years ago
Cc: | added |
---|
comment:4 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → New feature |
comment:5 by , 14 years ago
Easy pickings: | unset |
---|---|
Resolution: | → fixed |
Status: | new → closed |
seems to be fixed in 1.3: http://docs.djangoproject.com/en/1.3/releases/1.3/#transaction-context-managers
Note:
See TracTickets
for help on using tickets.
This is going to need a discussion, but certainly not before the 1.0 release. If you want, could you please post a message to django-developers some time after the 1.0 release?