Re: [Django Code] #2304: [patch] DISABLE_TRANSACTION_MANAGEMENT is not working as described in Doc's

0 views
Skip to first unread message

Django Code

unread,
Mar 18, 2008, 12:31:15 AM3/18/08
to djang...@holovaty.com, ja...@jacobian.org, django-...@googlegroups.com
#2304: [patch] DISABLE_TRANSACTION_MANAGEMENT is not working as described in Doc's
-------------------------------------------------+--------------------------
Reporter: scott.be...@openmercury.com | Owner: nobody
Status: new | Component: Database wrapper
Version: | Resolution:
Keywords: Unit of work, commit, rollback | Stage: Accepted
Has_patch: 1 | Needs_docs: 0
Needs_tests: 1 | Needs_better_patch: 0
-------------------------------------------------+--------------------------
Changes (by thejaswi_puthraya):

* needs_better_patch: 1 => 0

--
Ticket URL: <http://code.djangoproject.com/ticket/2304#comment:4>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines

Django

unread,
Nov 2, 2009, 11:28:39 AM11/2/09
to djang...@holovaty.com, django-...@googlegroups.com
#2304: [patch] DISABLE_TRANSACTION_MANAGEMENT is not working as described in Doc's
--------------------------------------------------------+-------------------
Reporter: scott.be...@openmercury.com | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version:
Resolution: | Keywords: Unit of work, commit, rollback, transactions
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 1
Needs_better_patch: 0 |
--------------------------------------------------------+-------------------
Changes (by ben):

* keywords: Unit of work, commit, rollback => Unit of work, commit,
rollback, transactions

--
Ticket URL: <http://code.djangoproject.com/ticket/2304#comment:5>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 2, 2009, 1:58:31 PM11/2/09
to djang...@holovaty.com, django-...@googlegroups.com
#2304: [patch] DISABLE_TRANSACTION_MANAGEMENT is not working as described in Doc's
--------------------------------------------------------+-------------------
Reporter: scott.be...@openmercury.com | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version:
Resolution: | Keywords: Unit of work, commit, rollback, transactions
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 1
Needs_better_patch: 0 |
--------------------------------------------------------+-------------------
Comment (by carljm):

This patch has been sitting around for quite a while. Meanwhile, the
[http://docs.djangoproject.com/en/dev/topics/db/transactions/#how-to-
globally-deactivate-transaction-management documentation still claims
DISABLE_TRANSACTION_MANAGEMENT works], when in fact it does nothing. If
this patch isn't ready to go in, would it be worth getting a patch in
temporarily to remove the documentation?

--
Ticket URL: <http://code.djangoproject.com/ticket/2304#comment:6>

Django

unread,
Nov 10, 2009, 1:30:12 PM11/10/09
to djang...@holovaty.com, django-...@googlegroups.com
#2304: [patch] DISABLE_TRANSACTION_MANAGEMENT is not working as described in Doc's
--------------------------------------------------------+-------------------
Reporter: scott.be...@openmercury.com | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version:
Resolution: | Keywords: Unit of work, commit, rollback, transactions
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 1
Needs_better_patch: 0 |
--------------------------------------------------------+-------------------
Comment (by henrybaxter):

I agree, it's pretty annoying to go through the process of figuring out
the setting does nothing.

--
Ticket URL: <http://code.djangoproject.com/ticket/2304#comment:7>

Django

unread,
Jan 10, 2010, 12:28:55 PM1/10/10
to djang...@holovaty.com, django-...@googlegroups.com
#2304: [patch] DISABLE_TRANSACTION_MANAGEMENT is not working as described in Doc's
--------------------------------------------------------+-------------------
Reporter: scott.be...@openmercury.com | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version:
Resolution: | Keywords: Unit of work, commit, rollback, transactions
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 1
Needs_better_patch: 1 |
--------------------------------------------------------+-------------------
Changes (by kmtracey):

* needs_better_patch: 0 => 1

Comment:

The existing patch is not the correct solution.

Per Jacob's response in this thread: http://groups.google.com/group
/django-developers/browse_thread/thread/b633d56fdc7d4107/

the problem is not that the function isn't implemented, but rather that
that docs and code do not agree on the name for the setting that controls
the function. The code uses a setting named TRANSACTIONS_MANAGED (default
value False in django/conf/global_settings.py), not a setting named
DISABLE_TRANSACTION_MANAGEMENT. The fix, I believe, is a simple global
replace in either the code or the doc of one for the other, depending on
which one is chosen to keep.

DISABLE_TRANSACTION_MANAGEMENT is the one I would keep. It seems to more
clearly convey that a setting of True means Django will not manage
transactions. I found the actual default value for TRANSACTIONS_MANAGED
to be surprising when I checked on it, because I expected it to reflect
whether Django code was responsible for transaction management. In fact
its apparently the reverse of what I expected based just on the name (I
did not look at the code that uses it, just noted that there is in fact
code that references its value, unlike DISABLE_TRANSACTION_MANAGEMENT).

Note neither name is documented in the full list of settings, so it might
be good to add doc there as well when this is done.

--
Ticket URL: <http://code.djangoproject.com/ticket/2304#comment:8>

Django

unread,
Jun 19, 2010, 5:18:20 PM6/19/10
to djang...@holovaty.com, django-...@googlegroups.com
#2304: [patch] DISABLE_TRANSACTION_MANAGEMENT is not working as described in Doc's
--------------------------------------------------------+-------------------
Reporter: scott.be...@openmercury.com | Owner: tjshewmake
Status: assigned | Milestone:
Component: Database layer (models, ORM) | Version:
Resolution: | Keywords: Unit of work, commit, rollback, transactions
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 1
Needs_better_patch: 1 |
--------------------------------------------------------+-------------------
Changes (by tjshewmake):

* owner: nobody => tjshewmake
* status: new => assigned

--
Ticket URL: <http://code.djangoproject.com/ticket/2304#comment:9>
Reply all
Reply to author
Forward
0 new messages