#24921: No Database objects can be created with set_autocommit(False)
-------------------------------------+-------------------------------------
     Reporter:  shabda               |                    Owner:  aaugustin
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  1.8
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Aymeric Augustin <aymeric.augustin@…>):

 In [changeset:"425c5e40eae90bd3ee3633011ef97edb26858c94" 425c5e4]:
 {{{
 #!CommitTicketReference repository=""
 revision="425c5e40eae90bd3ee3633011ef97edb26858c94"
 [1.8.x] Fixed #24921 -- set_autocommit(False) + ORM queries.

 This commits lifts the restriction that the outermost atomic block must
 be declared with savepoint=False. This restriction was overly cautious.

 The logic that makes it safe not to create savepoints for inner blocks
 also applies to the outermost block when autocommit is disabled and a
 transaction is already active.

 This makes it possible to use the ORM after set_autocommit(False).
 Previously it didn't work because ORM write operations are protected
 with atomic(savepoint=False).

 Backport of 91e9f1c from master
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24921#comment:19>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.24c021f2639633ea339ce227a46611f0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to