Edgewall Software

Changes between Version 58 and Version 59 of PySqlite


Ignore:
Timestamp:
Feb 26, 2015, 9:11:18 PM (9 years ago)
Author:
Ryan J Ollos
Comment:

Simplify how to get SQLite and PySQLite versions.

Legend:

Unmodified
Added
Removed
Modified
  • PySqlite

    v58 v59  
    7676}}}
    7777
     78Your system may require the development headers. Without these you will get various GCC related errors when attempting to build:
     79
     80{{{
     81$ apt-get install libsqlite3-dev
     82}}}
     83
    7884'''Users of Mac OS X please take care''': the Apple-supplied SQLite contains additional code to support file locking on network filesystems like AFP or SMB. This is not presently (3.3.6) in the mainline sources, so if you build your own SQLite from source it will not function correctly on such filesystems - typically it gives the error "{{{database is locked}}}". [http://alastairs-place.net/blog/2006/07/10/sqlite-and-mac/ A patch] used to be available, but you're better off using the Apple supplied version (presently 3.1.3).
    7985
     
    110116=== Determine actual SQLite and PySqlite version
    111117
    112 Troubleshooting is greatly helped by knowing exactly what versions are used for {{{sqlite}}} inside your Python interpreter. Especially on *nix systems different versions might exist and the actual versions linked and used might not be what you think.
    113 
    114 To test the version of PySqlite what your Python installation uses and the version of SQLite linked, try this inside an interpreter:
    115 {{{
    116 >>> import sqlite
    117 >>> sqlite.version
    118 '1.0.1'
    119 >>> sqlite._sqlite.sqlite_version()
    120 '2.8.16'
    121 }}}
    122 
    123 To ensure that this is the exact version Trac uses, you may try this:
    124 
    125 {{{
    126 #!python
    127 >>> import trac.db.sqlite_backend as sql
    128 >>> sql.sqlite_version
    129 (3, 7, 5)
    130 >>> sql.have_pysqlite
    131 2
    132 >>> sql.sqlite.version
    133 '2.6.0'
    134 }}}
    135 
    136 In other words, PySqlite is version 2.6.0, compiled and linked to use version SQLite 3.7.5.
     118The SQLite and PySqlite versions are displayed on the //About Trac// page for users that have the `CONFIGURATION_VIEW` permission.
     119
     120=== Test that bindings are imported
    137121
    138122Another way to test the bindings with PySqlite 2 is to use:
     
    142126
    143127This test should not fail.
    144 
    145 To install SQLite, your system may require the development headers. Without these you will get various GCC related errors when attempting to build:
    146 
    147 {{{
    148 $ apt-get install libsqlite3-dev
    149 }}}
    150128
    151129=== Check if database is ok