Re: transaction.on_commit() proposal

2022-08-22 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I'd also be okay with a docs change, although this wouldn't help avoid late-binding bugs quite so much. On Mon, Aug 22, 2022 at 1:51 PM Carlton Gibson wrote: > Related ticket from this weekend, suggesting a docs change: > https://code.djangoproject.com/ticket/33939 > > On Mon, 22 Aug 2022 at

Re: transaction.on_commit() proposal

2022-08-22 Thread Carlton Gibson
Related ticket from this weekend, suggesting a docs change: https://code.djangoproject.com/ticket/33939 On Mon, 22 Aug 2022 at 14:11, 'Adam Johnson' via Django developers (Contributions to Django itself) wrote: > Hi > > I just wrote a blog post on a late-binding bug that can occur with using >

transaction.on_commit() proposal

2022-08-22 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi I just wrote a blog post on a late-binding bug that can occur with using transaction.on_commit() with a function or lambda within a loop. THe post shows how using functools.partial() solves this. See the post here: