django-docker-box icon indicating copy to clipboard operation
django-docker-box copied to clipboard

Support different versions of SQLite (libsqlite) as well.

Open charettes opened this issue 7 years ago • 4 comments

Being able to test against different versions of SQLite would have been very useful to test and address and the recent regressions in 3.26 and window expression support added in 3.25.

charettes avatar Dec 11 '18 04:12 charettes

Great idea, but I'm actually not sure how to do this. Doesn't Python bundle specific versions of SQLite?

If we can install specific versions through apt this should be pretty simple (if not slightly hacky).

orf avatar Dec 11 '18 12:12 orf

There's this: http://charlesleifer.com/blog/compiling-sqlite-for-use-with-python-applications/ . But I don't think django can work with pysqlite, just standard library's sqlite.

adamchainz avatar Dec 11 '18 14:12 adamchainz

I know that a lot of distros link to libsqlite so using a PPA with multiple versions and choosing the right one to install should do.

charettes avatar Dec 11 '18 14:12 charettes

I managed to get this working by using LD_PRELOAD on Ubuntu.

  1. Download a source package of SQLite. Either the latest snapshot (to test against latest changes) or a source package (e.g. https://www.sqlite.org/2018/sqlite-src-3260000.zip for 3.26).
  2. Untar/zip the archive, ./configure; make
  3. Call LD_PRELOAD=/path/to/source/.libs/libsqlite3.so tests/runtests.py

charettes avatar Feb 02 '19 18:02 charettes