pysqlite after pysqlite-1.0.1 is seriously broken with sqlobject-0.6.1-r1. I dont know where the problem is but I couldn't fix it until I downgraded to pysqlite-0.5.1. That downgrade also forced an emerge of sqlite-2.8.16-r1 down from qslite-3.2.1-r3. I think upgraded to pysqlite and it still worked so I left it. Here is a test script to show the problem: #!/usr/bin/env python from sqlobject import SQLiteConnection, SQLObject, StringCol from sqlobject.sqlite import builder SQLiteConnection = builder() conn = SQLiteConnection('test.db') class MyTable(SQLObject): _connection = conn name = StringCol(alternateID=True) MyTable.createTable(ifNotExists=True) row1 = MyTable(name = 'Tom') del(row1) print MyTable.byName('Tom') And here is the error when it doesn't work: Traceback (most recent call last): File "/home/peckwood/test-sqlobject-sqlite.py", line 7, in ? conn = SQLiteConnection('test.db') File "/usr/lib/python2.3/site-packages/sqlobject/sqlite/sqliteconnection.py", line 13, in __init__ import sqlite ImportError: No module named sqlite Exception exceptions.AttributeError: "SQLiteConnection instance has no attribute '_pool'" in <bound method SQLiteConnection.__del__ of <sqlobject.sqlite.sqliteconnection.SQLiteConnection instance at 0xb7c25e8c>> ignored Reproducible: Always Steps to Reproduce: 1. emerge python, sqlite, pysqlite, sqlobject 2. run test script 3. if it works, delete test.db to rerun test Actual Results: ImportError: No module named sqlite Expected Results: <MyTable 1 name='Tom'>
Thanks, I changed the dependency to <pysqlite-2.0