#763: exceptions.AttributeError: "'pysqlite2.dbapi2.Connection' object has no
attribute 'autocommit'"
---------------------------------------+------------------------------------
 Reporter:  [email protected]     |        Owner:  anonymous
     Type:  defect                     |       Status:  reopened 
 Priority:  high                       |    Milestone:  1.5      
Component:  SQLObject                  |      Version:  0.9a4    
 Severity:  normal                     |   Resolution:           
 Keywords:  pysqlite sqlite SQLObject  |  
---------------------------------------+------------------------------------
Changes (by chrisz):

  * status:  closed => reopened
  * resolution:  fixed =>

Comment:

 As reported
 
[http://groups.google.com/group/turbogears/browse_thread/thread/08bbfce97eaa9f61
 here], the problem still exists.

 I think there are two problems here. 1) The __del__ method of SQLObject
 transactions is not very robust, it should silently ignore errors if
 things that it wants to clean up do not exist any more. This could be
 improved in SQLObject. 2) SQLObject unnecessarily creates transactions
 when defining a complex model with inheritance or two-way references. The
 `PackageHub` does not, as advertised, instantiate the `AutoConnectHub`
 when an attempt is made to use the database, but sometimes already
 earlier, because during model definition, if the model uses inheritance or
 two-way references, the connection is accessed as an attribute internally
 by SQLObject, and at this time TG unnecessarily instantiates the
 `AutoConnectHub` already, which automatically creates a connection and
 also a transaction already.

 Ticket #2160 is also caused by 2). The second patch suggested
 [http://trac.turbogears.org/attachment/ticket/2160/somodel2.patch there]
 (it can be applied to all 1.x versions) should solve the issue.

-- 
Ticket URL: <http://trac.turbogears.org/ticket/763#comment:24>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to