diff options
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/dialects/mssql/pymssql.py | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/pymssql.py b/lib/sqlalchemy/dialects/mssql/pymssql.py index 0961c2e76..71f583b13 100644 --- a/lib/sqlalchemy/dialects/mssql/pymssql.py +++ b/lib/sqlalchemy/dialects/mssql/pymssql.py @@ -1,3 +1,9 @@ +""" +Support for the pymssql dialect. + +Going forward we will be supporting the 1.0 release of pymssql. + +""" from sqlalchemy.dialects.mssql.base import MSDialect from sqlalchemy import types as sqltypes @@ -8,7 +14,7 @@ class MSDialect_pymssql(MSDialect): driver = 'pymssql' @classmethod - def import_dbapi(cls): + def dbapi(cls): import pymssql as module # pymmsql doesn't have a Binary method. we use string # TODO: monkeypatching here is less than ideal @@ -19,17 +25,8 @@ class MSDialect_pymssql(MSDialect): super(MSSQLDialect_pymssql, self).__init__(**params) self.use_scope_identity = True - # pymssql understands only ascii - if self.convert_unicode: - util.warn("pymssql does not support unicode") - self.encoding = params.get('encoding', 'ascii') - def create_connect_args(self, url): - if hasattr(self, 'query_timeout'): - # ick, globals ? we might want to move this.... - self.dbapi._mssql.set_query_timeout(self.query_timeout) - keys = url.query if keys.get('port'): # pymssql expects port as host:port, not a separate arg @@ -40,7 +37,4 @@ class MSDialect_pymssql(MSDialect): def is_disconnect(self, e): return isinstance(e, self.dbapi.DatabaseError) and "Error 10054" in str(e) - def do_begin(self, connection): - pass - dialect = MSDialect_pymssql
\ No newline at end of file |
