[ANN] PySQLite 0.4.0 released

Gerhard Häring gerhard.haering at gmx.de
Tue Feb 11 09:06:29 EST 2003


NAME:
    PySQLite - Extension module for SQLite databases.

DESCRIPTION:
    A Python-DB API 2.0 compliant extension module that uses the SQLite
    embedded SQL database. No external SQL server required. Think of
    Gadfly, only faster.

    SQLite is a powerful, embedded relational database in a compact C
    library. It supports a large subset of SQL92, multiple tables and
    indices,  transactions, and triggers. Sources are uncopyrighted and
    can be used for any purpose. More information can be found at
    <http://www.hwaci.com/sw/sqlite/index.html>.

HOMEPAGE:
    <http://pysqlite.sourceforge.net>

DOWNLOAD:
    Source and Windows binary downloads are available at
    <http://www.sourceforge.net/projects/pysqlite>

AUTHORS:
    Gerhard Häring <gerhard.haering at gmx.de>
    Michael Owens <mike at mikesclutter.com>

LICENSE:
    Python

NOTES:
The following are changes and enhancements since the last release:

IMPORTANT BACKWARDS INCOMPATIBLE CHANGE:
========================================

SQLite is typeless, that's why we had the special command
"pysqlite_pragma expected types = type1, type2, ..., typen" which was parsed
in the Python layer.

Of course, this isn't standard SQL so such code isn't portable to other DB-API
modules.

That's why I changed this mechanism. The new syntax is

    -- types = type1, type2, ..., typen

Which is just a special SQL comment that other database backends will
cheerfully ignore.

On the Python side of things, Connection has now an attribute 'rowclass' that
is set to PgResultSet by default. This attribute is written in every new
cursor instance. rowclass == tuple is handled differently - nothing needs to
be done because the C layer already returns tuples. So with con.rowclass =
tuple you'll get a noticeable speed boost :-) The tuple thing doesn't handle
Python 2.1 yet, but I wonder if we should just discontinue support for
anything older than 2.2 in the first place.


NOT SO IMPORTANT CHANGES (FOR THE END USER)
===========================================

Lots of little changes, like Python 2.3 compatibility, fixes for the Debian
control files.

The type conversions and converters were moved from the Python layer into the
C layer. This was done so this is happening at *one* place. 

- Moved exceptions from pysqlite_exceptions.py to _sqlite.c.
- Moved type codes from sqlite/constants/FIELD_TYPE.py to _sqlite.c
- Trimmed available type codes.
- Require SQLite version 2.5.6 or later.
- Always use "pragma show_datatypes=on"
- Made the type conversion actually work and fixed a potential strcpy-related
  buffer overrun.
- In cursor.description, set all fields to None where we don't know anything
  about (as the DB-API specification tells).
- Fixed sqlite_is_at_least_version.
- Renamed '_sqlite.enable_userfunction_debugging' to
  '_sqlite.enable_callback_debugging', because it is now also usable for busy
  callbacks.
- Make process_record cope with empty data. This occurs when PRAGMA
  EMPTY_RESULT_CALLBACKS=ON was set by the user.
- Wrap sqlite_busy_handler and sqlite_busy_timeout.




More information about the Python-list mailing list