summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/connectors
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-01-30 20:29:48 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2011-01-30 20:29:48 -0500
commit12073e281eebdece0fe4e24c6704d57eafdc9247 (patch)
tree1c831d73551c5a2e490bae41af390bd44d6391b5 /lib/sqlalchemy/connectors
parent41d222b5f85d81c3cb7c33be284b9b5507463cb2 (diff)
downloadsqlalchemy-12073e281eebdece0fe4e24c6704d57eafdc9247.tar.gz
- SchemaItem, SchemaType now descend from common type
SchemaEventTarget, which supplies dispatch - the dispatch now provides before_parent_attach(), after_parent_attach(), events which generally bound the _set_parent() event. [ticket:2037] - the _on_table_attach mechanism now usually uses the event dispatch - fixed class-level event dispatch to propagate to all subclasses, not just immediate subclasses - fixed class-level event unpickling to handle more involved inheritance hierarchies, needed by the new schema event dispatch. - ForeignKeyConstraint doesn't re-call the column attach event on ForeignKey objects that are already associated with the correct Column - we still need that ImportError on mysqldb CLIENT FLAGS to support mock DBAPIs
Diffstat (limited to 'lib/sqlalchemy/connectors')
-rw-r--r--lib/sqlalchemy/connectors/mysqldb.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/sqlalchemy/connectors/mysqldb.py b/lib/sqlalchemy/connectors/mysqldb.py
index 27a56b749..189c412a0 100644
--- a/lib/sqlalchemy/connectors/mysqldb.py
+++ b/lib/sqlalchemy/connectors/mysqldb.py
@@ -87,10 +87,13 @@ class MySQLDBConnector(Connector):
# supports_sane_rowcount.
client_flag = opts.get('client_flag', 0)
if self.dbapi is not None:
- CLIENT_FLAGS = __import__(
- self.dbapi.__name__ + '.constants.CLIENT'
- ).constants.CLIENT
- client_flag |= CLIENT_FLAGS.FOUND_ROWS
+ try:
+ CLIENT_FLAGS = __import__(
+ self.dbapi.__name__ + '.constants.CLIENT'
+ ).constants.CLIENT
+ client_flag |= CLIENT_FLAGS.FOUND_ROWS
+ except (AttributeError, ImportError):
+ pass
opts['client_flag'] = client_flag
return [[], opts]