[Python-Dev] SQLite module for Python 2.5

Bob Ippolito bob at redivi.com
Thu Oct 21 06:15:07 CEST 2004


On Oct 20, 2004, at 23:53, Skip Montanaro wrote:

>     Bob> By default can mean that Python builds a SQLite wrapper if 
> SQLite
>     Bob> is available, just like it does for bsddb, readline, etc.
>
>>> Then why not MySQLdb, psycopg and sybase-python also?  No slight
>>> intended against PySQLite, but those other wrapper modules have been
>>> around quite a bit longer I think.
>
>     Phillip> Well, one difference is that none of the databases you 
> just
>     Phillip> listed are embeddable.  There has to be a separate 
> database
>     Phillip> server process.  SQLite, like other "database" modules in 
> the
>     Phillip> stdlib, just stores data in a disk file.
>
> It seems people misunderstood my comment.  I should have been more 
> clear.  I
> see no reason PySQLite should be accorded better status than any of the
> other relational database wrappers.  If MySQLdb, etc aren't included 
> with
> the distribution I don't think PySQLite should be either.  I realize 
> it's
> easier to administer a PySQLite database than a PostgreSQL database, 
> but
> from a pure client standpoint there's nothing really easier about it.  
> By
> including PySQLite we'd somehow be blessing it as a better SQL 
> solution than
> the other options.  That means it will almost certainly be stretched 
> beyond
> its limits and used in situations where it isn't appropriate (multiple
> writers, writers that hold the database for a long time, etc).  That 
> will
> reflect badly on both SQLite and Python.

By including expat are we blessing it as somehow a better solution than 
libxml2?

PySQLite *is* a better choice for inclusion than the others: because 
the license permits, it's standalone, easy to use. and can be 
reasonably included with binary distributions of Python (it can even be 
linked statically into the extension).  More or less any database 
module that's not embedded (except for ODBC, perhaps) is on shakier 
ground because the protocol can change between database versions, 
though I suppose that's not expected to happen very often for something 
like PostgreSQL.  Also, MySQLdb is especially tricky because of the 
license.

I can't imagine how that rather contrived scenario could reflect badly 
on Python or SQLite.. it certainly wouldn't be any worse than Python's 
standard library support for networking or XML, or the interpreter's 
inability to scale with threads.

-bob



More information about the Python-Dev mailing list