On Mon, Apr 15, 2013 at 2:40 AM, Ned Deily <n...@acm.org> wrote: > In article > <captjjmrp_9saig89dkse-p6d0kpbjxmfe1731dffagukvas...@mail.gmail.com>, > Chris Angelico <ros...@gmail.com> wrote: > > Actually, this is one place where I disagree with the current decision >> of the Python core devs: I think bindings for other popular databases >> (most notably PostgreSQL, and probably MySQL since it's so widely >> used) ought to be included in core, rather than being shoved off to >> PyPI. Databasing is so important to today's world that it would really >> help if people had all the options right there in core, if only so >> they're more findable (if you're browsing docs.python.org, you won't >> know that psycopg is available). Currently the policy seems to be "we >> don't include the server so why should we include the client"; I >> disagree, I think the client would stand nicely on its own. (Does >> Python have a DNS server module? DNS client? I haven't dug deep, but >> I'm pretty sure I can do name lookups in Python, yet running a DNS >> server is sufficiently arcane that it can, quite rightly, be pushed >> off to PyPI.) But this is minor, and tangential to this discussion. > > For the bindings to be useful, Python batteries-included distributions > (like python.org installers) would either need to also ship the various > DB client libraries for all supported platforms (including Windows), > which adds complexity and potentially intractable license issues, or > there would need to be reverse-engineered implementations of the client > libs or wire protocols, either option adding fragility and complex > testing issues. DNS client lookups use published, well-understood > Internet-standard protocols, not at all like talking to a third-party > database, be it open-source or not. Sqlite3 is certainly an anomaly in > that it is not-only open source but designed to be a lightweight, > compatible library that runs on just about everything, and with a > fanatical devotion to compatibility and documentation. These days just > about every major product or operating system platform ships with or > uses a copy of sqllite3 for something.
Understandable, but I'm actually referencing a discussion on either python-dev or python-ideas where the statement was made that it didn't make sense to include the client for something that the server for wasn't included. I can't find the discussion thread off-hand, but that, rather than the portability/complication issues, seemed to be the primary line of argument. I don't know about any others, but PostgreSQL's wire protocol isn't all that difficult to work with, and since we're talking about something where the far end is almost certainly going to consume some time, it wouldn't hurt to implement it in pure Python. Based on http://wiki.postgresql.org/wiki/Python it seems there are a few modules that do just that (unchecked, but if they work on any platform and don't require libpq, I strongly suspect they use Python's own networking); if one of those is of sufficient code quality for the stdlib, I think it would be an excellent addition. However, I am not a core dev, therefore sqlite is the only one included. ChrisA -- http://mail.python.org/mailman/listinfo/python-list