Database engine bindings for Python (was: Database statements via python but database left intact)

Ben Finney ben+python at benfinney.id.au
Sat Oct 5 21:05:35 EDT 2013


Chris Angelico <rosuav at gmail.com> writes:

> It's because of threads like this that I would really like Python to
> nudge people towards something stronger than MySQL. Would it kill
> Python to incorporate PostgreSQL bindings automatically?

I'm not sure what would count as “kill Python”. It would certainly make
the release management of Python needlessly dependent on the release
cycle of an independent project.

The Python bindings for MySQL or PostgreSQL, or even SQLite, are tied to
extension libraries for the specific database engine.

With SQLite this is not a problem for Python's release management,
because Python's release includes the entire SQLite database engine.
That code is quite small, so this is deemed a good trade.

With a separately-installed, far more complex database engine like MySQL
or PostgreSQL, the Python bindings will only work if they are compiled
against the correct client library. That client library is part of the
database engine code release, not Python. So placing that library in
Python's standard library would tie the release of Python's standard
library to the version of the database engine.

I sympathise with the desire to deprecate MySQL and encourage superior
solutions. But your proposed solution would only make Python release
management far more burdensome for an unclear benefit.

-- 
 \      “I tell you the truth: some standing here will not taste death |
  `\     before they see the Son of Man coming in his kingdom.” —Jesus |
_o__)                     Christ, c. 30 CE, as quoted in Matthew 16:28 |
Ben Finney




More information about the Python-list mailing list