Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 100858 - pysqlite broken in it's interaction with sqlobject
Summary: pysqlite broken in it's interaction with sqlobject
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-30 19:15 UTC by gnuorder
Modified: 2005-08-01 11:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gnuorder 2005-07-30 19:15:36 UTC
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'>
Comment 1 Rob Cakebread (RETIRED) gentoo-dev 2005-08-01 11:30:52 UTC
Thanks, I changed the dependency to <pysqlite-2.0