#24228: Signals have unclear & inconsistent transaction handling
-------------------------------------+-------------------------------------
Reporter: Gaffney | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.7
(models, ORM) | Keywords: transaction, signals,
Severity: Normal | documentation
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Hello
The [https://docs.djangoproject.com/en/1.7/ref/signals/ signals
documentation] says nothing about transactions.
Looking in deletion.py,
[https://github.com/django/django/blob/fb48eb05816b1ac87d58696cdfe48be18c901f16/django/db/models/deletion.py#L282-L288
pre_delete and post_delete are within a transaction].
In base.py, however,
[https://github.com/django/django/blob/378a0d27d630386c1b0a53d4a2d48be767453198/django/db/models/base.py#L717-L719
pre_save] and
[https://github.com/django/django/blob/378a0d27d630386c1b0a53d4a2d48be767453198/django/db/models/base.py#L730-L732
post_save] are ''not'' within a transaction.
Whether this inconsistency is a bug is beyond my Django knowledge to
determine, but regardless, '''it should be clear in the documentation what
signals are within transactions'''.
--
Ticket URL: <https://code.djangoproject.com/ticket/24228>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.128acfc5b98602071a2f7c72bb93a1e8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.