Re: [Sqlalchemy-tickets] [sqlalchemy] #2715: add more explicit documentation/flags for the many gae
Brought to you by:
zzzeek
|
From: sqlalchemy <mi...@zz...> - 2013-12-06 22:43:39
|
#2715: add more explicit documentation/flags for the many gaerdbms DBAPI options
-----------------------------------+--------------------------------------
Reporter: moraes | Owner: zzzeek
Type: enhancement | Status: closed
Priority: medium | Milestone: 0.8.xx
Component: mysql | Severity: minor - half an hour
Resolution: fixed | Keywords: gaerdbms, mysql, dialect
Progress State: completed/closed |
-----------------------------------+--------------------------------------
Comment (by mjpieters):
I initially mistook this as a bug with either the GAE SDK or SQLAlchemy
bug, but at best it is an unfortunate interaction. In the `rdbms_mysql`
module, if `import MySQLdb` fails, `connect` is defined as:
{{{
#!python
def connect(instance=None, database=None):
logging.error('The rdbms API (Google Cloud SQL) is not available
because '
'the MySQLdb library could not be loaded. Please see the
SDK '
'documentation for installation instructions.')
raise NotImplementedError('Unable to find the MySQLdb library')
}}}
so connecting will raise an exception, but `paramstyle` and other
parameters, normally imported with `from MySQLdb import *`, are naturally
missing.
If you are feeling generous, perhaps the
`sqlalchemy.dialects.mysql.gaerdbms:MySQLDialect_gaerdbms.dbapi()` class
method could verify `paramstyle` is present and raise an `ImportError`
exception if not available.
--
Ticket URL: <http://www.sqlalchemy.org/trac/ticket/2715#comment:8>
sqlalchemy <http://www.sqlalchemy.org/>
The Database Toolkit for Python
|