I redid my installs, w/ SQLite 2.8.15 (since that's what apt-get gives
me) and pysqlite 1.0.1. Now TG sez:
ValueError: You must use sqlite2 to use in-memory databases
This comes from sqliteconnection.py in SQLObject 0.7, which does:
try:
from pysqlite2 import dbapi2 as sqlite
using_sqlite2 = True
except ImportError:
import sqlite
using_sqlite2 = False
...
if not using_sqlite2:
raise ValueError("You must use sqlite2 to use in-memory
databases")
Now, I do have SQLite 2, but pysqlite 1.0.1 installs itself as
"sqlite," not "pysqlite2". And when I import sqlite, I can run an
in-memory database. In other words, the test in sqliteconnection.py is
spurious. I'm guessing this is legacy code dating from a time when
one could distinguish SQLite 2 support by the name of the installed
adapter.
When I change 'False' to 'True' in sqliteconnection.py, though,
nosetests still fails. This time, it's with:
opts["detect_types"] = sqlite.PARSE_DECLTYPES
AttributeError: 'module' object has no attribute 'PARSE_DECLTYPES'
PARSE_DECLTYPES was added to pysqlite in 2.0.7. Given that, and the
problem I see when trying to use 1.0.1, I can't understand how you are
able to run nosetests. Clearly, TG 0.9 expects at least
pysqlite-2.0.7. Maybe I'll get lucky if I install that.
Meanwhile, I think it's not overstating the case to say that unit
testing support in 0.9 is broken. It would only work if you happen to
have the versions of SQLite and pysqlite that SQLObject expects...and
if you're working in an environment where you're constrained to using
the RPMs from a particular Linux distribution, that is unlikely.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---