logo       

Re: Strange behavior on sqlite port: msg#00058

python.db.pysqlite.user

Subject: Re: Strange behavior on sqlite port

Hi Gerhard. You're quite right. It turned out that I had an older
version of sqlite3 on this machine that I had built from scratch. So I
was getting this:

Python 2.4.1 (#2, Mar 31 2005, 00:05:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pysqlite2 import dbapi2 as sqlite
>>> sqlite.version
'2.2.2'
>>> sqlite.sqlite_version
'3.2.7'
>>>

I removed pysqlite and reinstalled adjusting .cnf to paths to find the
right sqlite3 headers, etc with darwinports install. It's all good :-).
Thanks.

Regards,
David

Gerhard Häring wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> David Pratt wrote:
>> Here's a strange thing:
>>
>> On freeBSD with sqlite 3.3.5 and pysqlite 2.2.2
>>
>> Python 2.4.3 (#2, Apr 13 2006, 20:16:33)
>> [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> from pysqlite2 import dbapi2 as sqlite
>> >>> sqlite.enable_shared_cache(True)
>> >>>
>>
>> On darwinports with sqlite 3.3.5 and pysqlite 2.2.2
>>
>> Python 2.4.1 (#2, Mar 31 2005, 00:05:10)
>> [GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> from pysqlite2 import dbapi2 as sqlite
>> >>> sqlite.enable_shared_cache(True)
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in ?
>> AttributeError: 'module' object has no attribute 'enable_shared_cache'
>> >>>
>>
>> Is this telling me that darwinports is screwed up. I read the Portsfile
>> and it is supposed to be compiling sqlite3 with threads enabled - hmmm.
>> Any ideas?
>
> Two things to check:
>
> 1. Are you really running against sqlite 3.3.5?
>
> It is quite possible to build against other SQLite headers than the library
> that's loaded (/usr/local vs. /usr). You can print dbapi2.sqlite_version to
> verify.
>
> 2. Does SQLITE_OMIT_SHARED_CACHE get defined during the SQLite build process?
>
> - -- Gerhard
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFEbfN9dIO4ozGCH14RAqhiAJ4p47f+hs3cg0ELT/Jb/KLoESIgXACeKUTK
> Y9jLGSK9ouRWtmYyUip7qYc=
> =bLig
> -----END PGP SIGNATURE-----
> _______________________________________________
> pysqlite mailing list
> pysqlite-IAPFreCvJWPBWskQ1e/+sw@xxxxxxxxxxxxxxxx
> http://lists.initd.org/mailman/listinfo/pysqlite
>

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise