#24921: No Database objects can be created with set_autocommit(False)
-------------------------------+--------------------------------------
     Reporter:  shabda         |                    Owner:  shabda
         Type:  Uncategorized  |                   Status:  new
    Component:  Uncategorized  |                  Version:  1.8
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------

Comment (by shabda):

 So here is the use case:

 Lettuce, the BDD lib, doesn't wrap each scenario in transaction. I want to
 keep each scenario independent. lettuce provides two hooks
 before_each_scenario and after_each_scenario

 http://lettuce.it/reference/terrain.html#before-each-scenario

 In before_each_scenario I want to set_autocommit(False) and in
 after_each_scenario I want to do a transaction.rollback. I can't use the
 atomic decorator or context as the step functions are evaluated inside a
 third method.

 I believe this can be achieved by using named savepoints, but based on the
 docs the first way looked more straightforward.

--
Ticket URL: <https://code.djangoproject.com/ticket/24921#comment:7>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.67d766bab49cc1a1a6d69cfac11555b1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to