I have seen this too, but found not time to examine this so far. Maybe
this happened after upgrading vom SQ 0.3.6 to 0.3.7.
-- Chris
This is my first mac so i'm very unfamiliar with it, usually i use
Linux and on my notebook with linux i have updated turbogears to
10.2.2 and i haven't noticed any error, but if i'm not wrong on the
linux box i still have SA 0.3.6.
Thanks for the hint, i will try downgrading SA.
Regards,
Carlo.
Sure, as it really seems to be a SA issue.
</Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/SQLAlchemy-0.3.7-py2.4.egg/sqlalchemy/databases/sqlite.py:157: RuntimeWarning: The installed version of sqlite is out-dated, andwill cause errors in some cases.Version 3.3.13 or greater isrecommended>
Yes i supposed that this was the problem, so i have update sqlite to
the latest version of sqlite in both path /opt/local/bin (Macports)
and /usr/bin mac native version:
$ /usr/local/bin/sqlite -version
3.3.17
/usr/bin/sqlite3 -version
3.3.17
I'm feeling lost!
>
> Yes i supposed that this was the problem, so i have update sqlite to
> the latest version of sqlite in both path /opt/local/bin (Macports)
> and /usr/bin mac native version:
> $ /usr/local/bin/sqlite -version
> 3.3.17
>
> /usr/bin/sqlite3 -version
> 3.3.17
Try starting again with a fresh tarball of pysqlite from
http://initd.org/pub/software/pysqlite/releases/2.3/2.3.3/
pysqlite-2.3.3.tar.gz
untar, then edit setup.cfg in the pysqlite-2.3.3 directory
Change it from this:
[build_ext]
define=
include_dirs=/usr/include
library_dirs=/usr/lib
libraries=sqlite3
to
[build_ext]
define=
include_dirs=/opt/local/include
library_dirs=/opt/local/lib
libraries=sqlite3
then run python setup.py build etc in the normal way.
the errors that SQLite fixes in version 3.3.13 was probably introduced
in sqlite 3.3.9, and its this ticket:
http://www.sqlite.org/cvstrac/tktview?tn=2211
to see how well your sqlite version works, run the unit tests. they
pass 100% with sqlite 3.3.13 .
to know immediately what version of sqlite your pysqlite is bound to:
using pysqlite2:
>>> from pysqlite2 import dbapi2 as dbapi
>>> dbapi.sqlite_version
'3.3.13'
using py2.5's builtin sqlite:
>>> import sqlite3
>>> sqlite3.sqlite_version
'3.3.5'
note that SQLAlchemy imports sqlite like this (i.e. importing an
external pysqlite2 first, then the sqlite3 built in):
try:
from pysqlite2 import dbapi2 as sqlite
except ImportError, e:
try:
from sqlite3 import dbapi2 as sqlite #try the 2.5+
stdlib name.
except ImportError:
try:
sqlite = __import__('sqlite') # skip ourselves
except ImportError:
raise e
this behavior can be overridden by passing in a sqlite module directly
to create_engine:
create_engine('sqlite://', module=sqlite3)
/usr/bin/ld: for architecture ppc
/usr/bin/ld: warning /usr/local/lib/libsqlite3.dylib cputype (7,
architecture i386) does not match cputype (18) for specified -arch
flag: ppc (file not loaded)
Why pysqlite builds as power pc architeture?
Anyway i tried the pysqlite test and no errorrs:
""
from pysqlite2 import test
In [4]: test.test()
.............................................................................................................................................................................
----------------------------------------------------------------------
Ran 173 tests in 0.220s
OK
""
Also SQLAlchemy don't show errors anymore.
So i'm fine?
Thanks all for the great help!
Your sqlite certainly *is* out of date and can be updated, even if you
installed it bundled with python 2.5. If you want to be really sure,
locate the log in the code and add temporarily some print statements
about your sqlite version.
I ran into this problem as a debian etch user and had to backport sqlite
3.3.16 from debian sid to make sqlAlchemy 0.3.7 happy again. I put my
packages at
http://dom.eav.free.fr/etch-sqlite3.3.16/
if some etch user is interested...
dom
Same problem on OpenBSD 4.1 ... time to either wrestle with ports
or revert to PostgreSQL.
Probably not what you meant when you asked if anyone had the
same question!