Re: Transforming django-admin.py to a shell script

2013-03-02 Thread Joe Tennies
So, you are asking for the startproject (which again, you only run once, so I wouldn't think it would be TOO bad) to create a manage.bat that had the following line in it? python manage.py %* I'm not saying that this is a bad idea. It does make it fairly easy for Windows people. In the case of Li

Re: Switch to database-level autocommit

2013-03-02 Thread Florian Apolloner
Hi Shai, On Sunday, March 3, 2013 12:27:47 AM UTC+1, Shai Berger wrote: > > > I also believe that it beats the alternative — namely, live with the > > > current behavior forever. > > > I sincerely hope that is not the only alternative; that there's a way to > implement the new behavior side-b

Re: Switch to database-level autocommit

2013-03-02 Thread Jacob Kaplan-Moss
On Sat, Mar 2, 2013 at 3:27 PM, Shai Berger wrote: >> I believe that the level of backwards-incompatibility described above is >> within acceptable bounds for Django 1.6. > > I believe this is the core of our disagreement here. I'm with Aymeric: the current behavior is bad enough, and this is a b

Re: Switch to database-level autocommit

2013-03-02 Thread Shai Berger
Hi again, On Sunday 03 March 2013, Aymeric Augustin wrote: > On 2 mars 2013, at 21:46, Shai Berger wrote: > > The Django documentation on transactions, at the moment says this on > > Django's > > > > default behavior[0]: > >> Django’s default behavior is to run with an open transaction which it

Re: Switch to database-level autocommit

2013-03-02 Thread Aymeric Augustin
On 2 mars 2013, at 21:46, Shai Berger wrote: > The Django documentation on transactions, at the moment says this on Django's > default behavior[0]: > >> Django’s default behavior is to run with an open transaction which it >> commits automatically when any built-in, data-altering model function

Re: Transforming django-admin.py to a shell script

2013-03-02 Thread Alon Nisser
much simpler. simply making it run with simple `manage somecommand` instead of `python manage.py somecommand`. using setuptools or something similiar On Saturday, March 2, 2013 12:17:25 AM UTC+2, Łukasz Rekucki wrote: > > On 1 March 2013 22:38, Alon Nisser >wrote: > >> at least from my windows ex

Re: Switch to database-level autocommit

2013-03-02 Thread Shai Berger
On Saturday 02 March 2013, Aymeric Augustin wrote: > On 2 mars 2013, at 16:18, Shai Berger wrote: > > -1. Make it easier (and cross-backend) to set db-level-autocommit on. Put > > the setting for it in the default template for new projects. Don't > > change existing code from "fragile" to "subtly

Re: Switch to database-level autocommit

2013-03-02 Thread Aymeric Augustin
On 2 mars 2013, at 16:18, Shai Berger wrote: > -1. Make it easier (and cross-backend) to set db-level-autocommit on. Put the > setting for it in the default template for new projects. Don't change > existing > code from "fragile" to "subtly broken". This isn't simply about changing some defau

Re: Switch to database-level autocommit

2013-03-02 Thread Aymeric Augustin
On 2 mars 2013, at 15:50, Shai Berger wrote: > There is an issue you seem to be ignoring: An "ORM Write" is, in many cases, > more than a single query against the backend. The most obvious example is > models with inheritance -- trying to do these with database-level autocommit > means that th

Re: Switch to database-level autocommit

2013-03-02 Thread Shai Berger
Thinking again, a few more points come to mind: On Friday 01 March 2013, Aymeric Augustin wrote: > > Such transactions are useless and don't come for free. Relying on them to > enforce integrity is extremely fragile — what if an external library > starts writing to a log table in the middle of one

Re: Switch to database-level autocommit

2013-03-02 Thread Shai Berger
On Friday 01 March 2013, Aymeric Augustin wrote: > Hello, > > I'd like to improve transactions handling in Django. The first step is [to > replace -- assumed, SB] the current emulation of autocommit with > database-level autocommit. > There is an issue you seem to be ignoring: An "ORM Write" is,