#22309: error accessing django.db.connection.features?
----------------------------------------------+--------------------
     Reporter:  lucastan@…                    |      Owner:  nobody
         Type:  Uncategorized                 |     Status:  new
    Component:  Database layer (models, ORM)  |    Version:  1.6
     Severity:  Normal                        |   Keywords:
 Triage Stage:  Unreviewed                    |  Has patch:  0
Easy pickings:  0                             |      UI/UX:  0
----------------------------------------------+--------------------
 I am using South 0.8.4  (refer to source
 
https://bitbucket.org/andrewgodwin/south/src/c26229113db6bbdebf36e6b31d76b45a48e29340/south/db/generic.py?at=0.8.4#cl-124)

 The file  south/db/generic.py  has this function has_ddl_transactions
 which access django.db.connection.features.supports_transactions

 However, upon accessing, it gives an error. The error could be reproduced
 by the following:

 {{{

 ./manage.py shell

 >>> from django.db import connection
 >>> connection.features.supports_transactions

 Traceback (most recent call last):
   File "<console>", line 1, in <module>
   File "/home/xx/venv/local/lib/python2.7/site-
 packages/django/utils/functional.py", line 49, in __get__
     res = instance.__dict__[self.func.__name__] = self.func(instance)
   File "/home/xx/venv/local/lib/python2.7/site-
 packages/django/db/backends/__init__.py", line 664, in
 supports_transactions
     self.connection.leave_transaction_management()
   File "/home/xx/venv/local/lib/python2.7/site-
 packages/django/db/backends/__init__.py", line 315, in
 leave_transaction_management
     "Transaction managed block ended with pending COMMIT/ROLLBACK")
 TransactionManagementError: Transaction managed block ended with pending
 COMMIT/ROLLBACK



 }}}

 Using south 0.8.4 and django 1.6. Seems like a Django error? But in the
 first place, is it safe to access  features attribute?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/22309>
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/061.566f2f2803cabca7d91403de22eef52f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to