
At 11:36 AM 3/29/2006 -0800, Guido van Rossum wrote:
On 3/28/06, Anthony Baxter <anthony@interlink.com.au> wrote:
I'm happy to work with Gerhard to make this happen. Does it need a PEP? I'd say "no", but only because things like ElementTree didn't, either. Does it need a BDFL pronouncement? I'd say yes.
Unless you've recanted on that already, let me point out that I've never seen sqlite, and I've ignored this thread, so I don't know what the disagreement is all about. Perhaps one person in favor and one person against could summarize the argument for me?
Pro: * SQLite is really nice to have for writing simple applications with small data needs, especially client-side software. It's probably the best-of-breed open source embedded SQL DB right now. * So, having a wrapper would be a big "Batteries included" plus for Python Con: * Competing Python wrappers exist * SQLite itself is updated frequently, let alone the wrappers * Build integration risks unknown, possible delay of 2.5? * Another external library to track and maybe have emergency updates of I personally lean somewhat toward the con side because to me it's just as easy to "easy_install pysqlite" after the fact, or get it from the appropriate packager (RPM, Debian, whatever). However, we can't please everybody. If we go for more "batteries included", one group will complain about how much we have linked in and don't have proper system dependencies. If we go for "easy to install add-ons", the same people will gripe that it's the job of the packaging system to do those add-ons, and another group will chime in that they don't have or don't want the packaging system. So we might as well flip a coin. :)

Phillip J. Eby wrote:
At 11:36 AM 3/29/2006 -0800, Guido van Rossum wrote:
On 3/28/06, Anthony Baxter <anthony@interlink.com.au> wrote:
I'm happy to work with Gerhard to make this happen. Does it need a PEP? I'd say "no", but only because things like ElementTree didn't, either. Does it need a BDFL pronouncement? I'd say yes.
Unless you've recanted on that already, let me point out that I've never seen sqlite, and I've ignored this thread, so I don't know what the disagreement is all about. Perhaps one person in favor and one person against could summarize the argument for me?
Pro:
* SQLite is really nice to have for writing simple applications with small data needs, especially client-side software. It's probably the best-of-breed open source embedded SQL DB right now.
* So, having a wrapper would be a big "Batteries included" plus for Python
Con:
* Competing Python wrappers exist
Which aren't DBAPI compliant, and I think not nearly as popular.
* SQLite itself is updated frequently, let alone the wrappers
That's a point.
* Build integration risks unknown, possible delay of 2.5?
There could be an sqlite-integration branch. If it's ready for beta 1, it is merged then, if not, it is merged to trunk after 2.5 final happened. Georg

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Phillip J. Eby wrote:
At 11:36 AM 3/29/2006 -0800, Guido van Rossum wrote:
[...] Perhaps one person in favor and one person against could summarize the argument for me?
Pro:
* SQLite is really nice to have for writing simple applications with small data needs, especially client-side software. It's probably the best-of-breed open source embedded SQL DB right now. * So, having a wrapper would be a big "Batteries included" plus for Python
That would be my arguments, too.
Con:
* Competing Python wrappers exist
There is really only one other relevant wrapper: APSW. It was purposefully designed to *not* use the DB-API 2.0 (though a similar one), and being a "thinner" wrapper of SQLite. It wraps a few more functions of the SQLite API, though less and less, because pysqlite is catching up here. While there might be arguments for a "thinner" wrapper, I think that pysqlite has the advantage of being DB-API compliant (even with most optional DB-API extensions) and thus offers a good way to prototype database apps with a smooth upgrade path to other, more powerful, databases.
* SQLite itself is updated frequently, let alone the wrappers
SQLite being updated regularly is not really a problem, because we can link dynamically against SQLite. And we probably *should* do this on Windows, too, so users can replace a SQLite.DLL with an updated version if they wish to.
* Build integration risks unknown, possible delay of 2.5? * Another external library to track and maybe have emergency updates of
Emergency updates are only for security problems, right? I don't think this would apply to pysqlite. I don't think that would apply to SQLite either, but if it's conceivable, it's another argument for dynamic linking. - -- Gerhard -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFEKvlzdIO4ozGCH14RAuLKAJ9BGnHz4Tym60xOGSwSuqXlqRaAdwCdFeqx +vo5eC0aBu4S2sttb/iZPOc= =bJKK -----END PGP SIGNATURE-----

On 3/29/06, Phillip J. Eby <pje@telecommunity.com> wrote:
Pro:
[...] Con:
* Competing Python wrappers exist * SQLite itself is updated frequently, let alone the wrappers * Build integration risks unknown, possible delay of 2.5? * Another external library to track and maybe have emergency updates of
All of these con arguments go for bsddb, too, and without sounding too negative about bsddb, I believe SQLite is a *much* better solution than BerkeleyDB, for roughly the same problem space. The same goes for pysqlite vs. bsddb. IMNSHO, SQLite and pysqlite are much easier to use correctly than BerkelyDB and bsddb, for simple and complex tasks. I may be biased against bsddb because I spent too much time hunting refleaks in it, but I'm not biased in favour of SQLite -- I'm a PostgreSQL user myself. ;-P I personally lean somewhat toward the con side because to me it's just as
easy to "easy_install pysqlite" after the fact, or get it from the appropriate packager (RPM, Debian, whatever).
Actually, I have no doubt that all the package managers will split the 'bundled' pysqlite (whatever the name will be) in a separate package, just like it's done for Tkinter and bsddb and most other stdlib modules with extra dependencies. Nevertheless, adding it to the standard library is probably a good thing. I would probably choose sqlite instead of shelve/anydbm/bsddb if it were part of the standard library, even though it's probably installed on all my machines anyway. I guess it's a psych thing. As for people asking about deadlocks, well, I much rather explain about sqlite deadlocks than about BerkelyDB transactions. -- Thomas Wouters <thomas@python.org> Hi! I'm a .signature virus! copy me into your .signature file to help me spread!

On Wed, Mar 29, 2006 at 11:47:10PM +0200, Thomas Wouters wrote:
Con:
* Competing Python wrappers exist * SQLite itself is updated frequently, let alone the wrappers * Build integration risks unknown, possible delay of 2.5? * Another external library to track and maybe have emergency updates of
All of these con arguments go for bsddb, too, and without sounding too negative about bsddb, I believe SQLite is a *much* better solution than BerkeleyDB, for roughly the same problem space. The same goes for pysqlite vs. bsddb. IMNSHO, SQLite and pysqlite are much easier to use correctly than BerkelyDB and bsddb, for simple and complex tasks. I may be biased against bsddb because I spent too much time hunting refleaks in it, but I'm not biased in favour of SQLite -- I'm a PostgreSQL user myself. ;-P
Agreed. sqlite is a joy to use. Its simple. It provides table structure that anyone can understand. BerkeleyDB is very powerful but requires a much more serious time investment to use usefully than sqlite for anything other than simple dictionary-like data storage. I wanted sqlite to exist for years. The intentionally undocumented bsddb.db.dbtables module i hacked together in early 2000 would never have been written had sqlite existed at the time. other things available at the time (gadfly anyone?) just didn't seem right.
probably a good thing. I would probably choose sqlite instead of shelve/anydbm/bsddb if it were part of the standard library, even though it's probably installed on all my machines anyway. I guess it's a psych thing.
As for people asking about deadlocks, well, I much rather explain about sqlite deadlocks than about BerkelyDB transactions.
yep.

Phillip> Pro: Phillip> * SQLite is really nice to have for writing simple applications Phillip> with small data needs, especially client-side software. It's Phillip> probably the best-of-breed open source embedded SQL DB right Phillip> now. Phillip> * So, having a wrapper would be a big "Batteries included" plus Phillip> for Python Phillip> Con: Phillip> * Competing Python wrappers exist Phillip> * SQLite itself is updated frequently, let alone the wrappers Phillip> * Build integration risks unknown, possible delay of 2.5? Phillip> * Another external library to track and maybe have emergency Phillip> updates of I haven't been tracking the pysqlite discussion either, but one con you missed is that regardless of pro #1 people will almost certainly apply it to problems for which it is ill-suited, reflectly poorly on both Python and SQLite. Of course, that can and does happen today. Including pysqlite with Python just means it will happen more frequently. Phillip> I personally lean somewhat toward the con side because to me Phillip> it's just as easy to "easy_install pysqlite" after the fact, or Phillip> get it from the appropriate packager (RPM, Debian, whatever). Is it not possible to distribute an empty db package which is then populated with various database eggs (or other similar installation things)? Skip

skip@pobox.com wrote:
I haven't been tracking the pysqlite discussion either, but one con you missed is that regardless of pro #1 people will almost certainly apply it to problems for which it is ill-suited, reflectly poorly on both Python and SQLite.
the arguments keep getting more and more weird. is there *any* part of the standard Python distribution that cannot be applied to problems for which it is ill-suited? </F>

>> I haven't been tracking the pysqlite discussion either, but one con >> you missed is that regardless of pro #1 people will almost certainly >> apply it to problems for which it is ill-suited, reflectly poorly on >> both Python and SQLite. Fredrik> the arguments keep getting more and more weird. Fredrik> is there *any* part of the standard Python distribution that Fredrik> cannot be applied to problems for which it is ill-suited? To many people "SQL" in the name implies "big databases". I know from personal experience at work. The powers-that-be didn't want to support another database server (we already have Sybase) and didn't want our group's experimental data "polluting" the production database, so the folks who wanted it went the SQLite/pysqlite route. They were immediately bitten by the multiple reader/single writer limitation and they tried to cram too much data into it, so performance further sucked. Skip

skip@pobox.com wrote:
The powers-that-be didn't want to support another database server (we already have Sybase) and didn't want our group's experimental data "polluting" the production database, so the folks who wanted it went the SQLite/pysqlite route. They were immediately bitten by the multiple reader/single writer limitation and they tried to cram too much data into it, so performance further sucked.
Firebird could be a solution to this. It can be used in a mode that doesn't need a server, and it has no trouble at all with concurrency or large amounts of data that I know of. In fact, a Firebird interface might be an alternative worth considering for the library. It would have most of the advantages of SQLite without these disadvantages. -- Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | Carpe post meridiam! | Christchurch, New Zealand | (I'm not a morning person.) | greg.ewing@canterbury.ac.nz +--------------------------------------+

Greg Ewing wrote:
Firebird could be a solution to this. It can be used in a mode that doesn't need a server, and it has no trouble at all with concurrency or large amounts of data that I know of.
so a library that doesn't support multiple independent readers/writers on a single file at all is much better than one that does, at least if the latter immediately reports conflicts if you use a zero second timeout ? </F>

Fredrik Lundh wrote:
Greg Ewing wrote:
Firebird could be a solution to this.
so a library that doesn't support multiple independent readers/writers on a single file at all is much better than one that does,
Where do you get that from? Firebird supports multiple readers/writers perfectly well. Greg

Greg Ewing wrote:
Firebird could be a solution to this.
so a library that doesn't support multiple independent readers/writers on a single file at all is much better than one that does,
Where do you get that from? Firebird supports multiple readers/writers perfectly well.
not according to the documentation (which says that the embedded library locks the database file, to prevent other independent processes from accessing the data). but that might of course be misleading or outdated information. do you have a URL that explains how the embedded Firebird component handles concurrency ? (something comparable to http://www.sqlite.org/lockingv3.html, that is.) </F>

Fredrik Lundh wrote:
not according to the documentation (which says that the embedded library locks the database file, to prevent other independent processes from accessing the data).
I think that means other *non-Firebird* processes. Firebird itself uses a system of file locks and transactions to manage concurrent access by different Firebird applications. Just to make sure I wasn't imagining things, I ran two instances of a program of mine that uses Firebird, without server, accessing the same database, and both worked fine. They can independently access different parts of the database, and if they try to update the same part at the same time, deadlocks are reported as appropriate. On the whole I'm very impressed with Firebird. I've found it to be nothing less than sleek, efficient, powerful and reliable. I'd encourage anyone looking for a database, embedded or otherwise, to give it a go. -- Greg

On Thursday 30 March 2006 12:07, skip@pobox.com wrote:
To many people "SQL" in the name implies "big databases". I know from personal experience at work. The powers-that-be didn't want to support another database server (we already have Sybase) and didn't want our group's experimental data "polluting" the production database, so the folks who wanted it went the SQLite/pysqlite route. They were immediately bitten by the multiple reader/single writer limitation and they tried to cram too much data into it, so performance further sucked.
And people trying to build production systems on SimpleHTTPServer, SimpleXMLRPCServer, smptd, or dumbdbm will also find their performance sucks. What's your point? Anthony -- Anthony Baxter <anthony@interlink.com.au> It's never too late to have a happy childhood.

At 04:00 PM 3/29/2006 -0600, skip@pobox.com wrote:
Is it not possible to distribute an empty db package which is then populated with various database eggs (or other similar installation things)?
I don't think I understand your question. If you are asking whether it's possible to have Java-like "namespace packages" in Python, the answer is yes. The stdlib module "pkgutil" supports this for regular filesystem packages, and the "pkg_resources" module in setuptools extends this support to zipfiles and eggs.

>> Is it not possible to distribute an empty db package which is then >> populated with various database eggs (or other similar installation >> things)? Phillip> I don't think I understand your question. Someone was throwing around names like db.sqlite as the place to install pysqlite. That suggests other database interface modules like db.mysql, db.postgresql, db.sybase, etc. Given that we probably won't include all those as standard modules, we should make it easy for someone to install one or more of those modules via normal external mechanisms and have them appear seamlessly to the Python programmer. Then I begin to wonder why bother with db.sqlite at all. Why not just create an empty db package that does the pkgutil or pkg_resources dance and let people install all N database interfaces instead of just N-1? Skip

On Thursday 30 March 2006 12:15, skip@pobox.com wrote:
Someone was throwing around names like db.sqlite as the place to install pysqlite.
Dunno who originally suggested it, but the theory was that there's some issue with toplevel library namespace pollution. I'm not too stressed out one way or the other - but starting off with 'db.sqlite' (and then maybe moving/aliasing db.bsddb &c at a future point) doesn't seem like a bad idea.
That suggests other database interface modules like db.mysql, db.postgresql, db.sybase, etc. Given that we probably won't include all those as standard modules, we should make it easy for someone to install one or more of those modules via normal external mechanisms and have them appear seamlessly to the Python programmer. Then I begin to wonder why bother with db.sqlite at all. Why not just create an empty db package that does the pkgutil or pkg_resources dance and let people install all N database interfaces instead of just N-1?
The same could be said of vast amounts of the standard library. Anthony -- Anthony Baxter <anthony@interlink.com.au> It's never too late to have a happy childhood.
participants (9)
-
Anthony Baxter
-
Fredrik Lundh
-
Georg Brandl
-
Gerhard Häring
-
Greg Ewing
-
Gregory P. Smith
-
Phillip J. Eby
-
skip@pobox.com
-
Thomas Wouters