From c691b4cbdf7424964f49ac2fd05057514e5856a3 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 11 Dec 2010 17:44:46 -0500 Subject: - support for cdecimal - add --with-cdecimal flag to tests, monkeypatches cdecimal in - fix mssql/pyodbc.py to not use private '_int' accessor in decimal conversion routines - pyodbc version 2.1.8 is needed for cdecimal in any case as previous versions also called '_int', 2.1.8 adds the same string logic as our own dialect, so that logic is skipped for modern pyodbc version - make the imports for "Decimal" consistent across the whole lib. not sure yet how we should be importing "Decimal" or what the best way forward is that would allow a clean user-invoked swap of cdecimal; for now, added docs suggesting a global monkeypatch - the two decimal libs are not compatible with each other so any chance of mixing produces serious issues. adding adapters to DBAPIs tedious and adds in-python overhead. suggestions welcome on how we should be doing Decimal/cdecimal. --- lib/sqlalchemy/dialects/mssql/pymssql.py | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/sqlalchemy/dialects/mssql/pymssql.py') diff --git a/lib/sqlalchemy/dialects/mssql/pymssql.py b/lib/sqlalchemy/dialects/mssql/pymssql.py index c5f471942..1368f6414 100644 --- a/lib/sqlalchemy/dialects/mssql/pymssql.py +++ b/lib/sqlalchemy/dialects/mssql/pymssql.py @@ -35,7 +35,6 @@ Please consult the pymssql documentation for further information. from sqlalchemy.dialects.mssql.base import MSDialect from sqlalchemy import types as sqltypes, util, processors import re -import decimal class _MSNumeric_pymssql(sqltypes.Numeric): def result_processor(self, dialect, type_): -- cgit v1.2.1