Hi Andrew,

On 04/30/2015 06:13 AM, Andrew Godwin wrote:
> I agree that perhaps making it part of signals is not in everyone's
> favour (as signals are kind of unloved) but I also like the simplicity
> of Christopher's approach - the patch is small and understandable, and
> using it is pretty easy (especially to upgrade existing code into "safe"
> code).

transaction-hooks is actually fairly small and understandable too. And I
don't think it's hard to use for this situation, either; you'd just need
to use `connection.on_commit` in your signal handler if you wanted to
delay some action until post-commit.

> Unless it's going to be super easy to port transaction-hooks over, I
> think it might be nice to get this in and sealed (it's not adding too
> much more complexity). If transaction-hooks would land in core well,
> let's do that.

I don't think landing transaction-hooks in core for 1.9 would be hard at
all, and no-one has objected to the idea (AFAIK). I (or anyone really)
just need to get around to it. Motivation has been low so far mostly
because it works fine as an external add-on.

Overall, I'm -1 on merging the signals patch. I think ending up with two
different ways to do the same thing (one of which is specific to
signals) is a net negative, and I think the `connection.on_commit()`
approach is clearer and more flexible.

Carl

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/55425B8C.4040104%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to