Re: Table Locks and bulk creating inherited models

2016-05-02 Thread Gavin Wahl
I don't think any abstraction is possible. Postgres has 8 different table-level locking modes, in addition to advisory locks and 4 row-level lock modes. I would say any attempt to abstract that would remove functionality, and that would not be convenient. We are already suffering from an

Re: Table Locks and bulk creating inherited models

2016-05-02 Thread Curtis Maloney
On 03/05/16 14:08, Gavin Wahl wrote: > with MyModel.objects.lock(): > ... do stuff ... This is misleading as it implies the lock is released when the context manager exists, but in postgres at least the lock will be held until the end of the transaction. Hah! Shows how much I

Re: Table Locks and bulk creating inherited models

2016-05-02 Thread Gavin Wahl
> with MyModel.objects.lock(): > ... do stuff ... This is misleading as it implies the lock is released when the context manager exists, but in postgres at least the lock will be held until the end of the transaction. What advantage does implementing an ORM API for table locking

Re: Table Locks and bulk creating inherited models

2016-05-02 Thread Curtis Maloney
On 03/05/16 09:47, Russell Keith-Magee wrote: Hi Geoffrey Have you given any thought to what the API for a table lock would look like? Since it's a table-wide action, having it on the Manager makes some sense... though it would be, I suspect, implemented via _meta. I can see something

Re: Table Locks and bulk creating inherited models

2016-05-02 Thread Russell Keith-Magee
Hi Geoffrey On Tue, May 3, 2016 at 3:42 AM, Geoffrey Martin-Noble wrote: > Is there a particular reason Django doesn't implement table locks? These > are vendor-specific, but seem to be common to various SQL backends, which > is something Django generally does well. >

[ANNOUNCE] Django bugfix releases issued: 1.9.6 and 1.8.13

2016-05-02 Thread Tim Graham
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2016/may/02/bugfix-releases/ -- You received this message because you are subscribed to the Google Groups "Django developers

Re: Change executed raw mysql queries to return timezone aware datetimes.

2016-05-02 Thread Bryce Drennan
Would a per-database setting "TZ_AWARE_DATETIMES" help address the backwards compatability issue? It would default to True but would allow those who find the migration painful to do that on their own schedule. On Friday, April 29, 2016 at 2:06:34 AM UTC-7, Anssi Kääriäinen wrote: > > I'm

Table Locks and bulk creating inherited models

2016-05-02 Thread Geoffrey Martin-Noble
Is there a particular reason Django doesn't implement table locks? These are vendor-specific, but seem to be common to various SQL backends, which is something Django generally does well. I am working on an application in which I would like to be able to perform bulk create on inherited

Re: unique_together does not work as expected with nullable fields

2016-05-02 Thread Rich Rauenzahn
On Friday, April 29, 2016 at 11:00:37 AM UTC-7, Aymeric Augustin wrote: > > Hi Rich, > > On 29 Apr 2016, at 19:52, Rich Rauenzahn > wrote: > > > I see now that I need to provide a sentinel value -- > BOO=True,VAL=, or manually create additional unique indexes. > > >

Re: #26481 - Add a "strict mode" for defer()/only()

2016-05-02 Thread Fabien Schwob
I understand, but it's maybe hard to be aware of this solution. Maybe it's just something that can be raised in the documentation ? 2016-04-27 2:26 GMT+02:00 Tim Graham : > I guess there's some question about whether or not we need to make changes > in Django given Anssi's