[Python-ideas] Official MySQL module
ncoghlan at gmail.com
Fri Mar 8 00:20:34 CET 2013
On Fri, Mar 8, 2013 at 7:41 AM, Eric V. Smith <eric at trueblade.com> wrote:
> On 3/7/2013 4:16 PM, David Mertz wrote:
>> I disagree moderately with Dustin. Obviously, it is true that a magic
>> wand doesn't produce a standard-library module. However, having support
>> for MySQL/MariaDB (and PostgreSQL) in the standard library would be
>> desirable. This would bring MySQL support to the same level as we have
>> for SQLite3.
>> In particular, I would NOT WANT such standard library support to include
>> any ORM layer to it; I feel like those should remain as third-party
>> tools (and compete on their various merits). But the basic level of
>> providing a *binding* feels like something desirable (and specifically,
>> a binding that was as close to a drop-in substitute for 'sqlite3' as
> I agree with David on both points.
> - Surely a MySQL binding is a battery we should consider including, if
> an author were to offer it to us. I have no experience with them, so I
> can't offer any advice on which is best.
We've learned the hard way that including database bindings in the
standard library is a bad idea, as development on those bindings needs
to be synchronised with the release cycle of the corresponding
database server, not the Python release cycle. The bsddb bindings in
Python 2 were a neverending source of trouble, which is why they were
booted out to PyPI for Python 3.
sqlite3 is different (and more appropriate for the standard library),
as it's a wrapper around a file format rather than a binding to an
active database server.
The number one question to ask about candidates for standard library
inclusion is "Does it make sense for this module to receive new
features only once every 18-24 months, and only when you upgrade to a
new version of Python?". Interfaces to specific external services
(including databases) almost never pass that test.
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-ideas