Use standard sqlite3 module if available

Bug #1153465 reported by Alfred Morgan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Divmod Axiom
Fix Released
Undecided
Unassigned

Bug Description

If Axiom finds sqlite3 module then import that or else fallback importing pysqlite2.

Revision history for this message
Alfred Morgan (zectbumo) wrote :

I'm willing to work on this if it makes sense to do so.

Revision history for this message
Jean-Paul Calderone (exarkun) wrote :

Hmm? Axiom does this:

try:
    # Prefer the third-party module, as it is easier to update, and so may
    # be newer or otherwise better.
    from pysqlite2 import dbapi2
except ImportError:
    # But fall back to the stdlib module if we're on Python 2.6 or newer,
    # because it should work too. Don't do this for Python 2.5 because
    # there are critical, data-destroying bugs in that version.
    if sys.version_info >= (2, 6):
        import sqlite3 as dbapi2
    else:
        raise

Older versions of the stdlib sqlite3 module contain various bugs which make them unsuitable for use.

Revision history for this message
Alfred Morgan (amorgan) wrote :

I see, sorry about that I had looked in the folder of Axiom 0.6.0 where I downloaded from PyPI.

Revision history for this message
Jean-Paul Calderone (exarkun) wrote :

No problem. It seems like probably a new release is due, considering this any a number of other bugs have been fixed but never released. :)

Changed in divmod-axiom:
status: New → Fix Committed
Changed in divmod-axiom:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.