From: Mike Bayer Date: Mon, 5 Oct 2009 20:16:34 +0000 (+0000) Subject: - Changed the name of TrustedConnection to X-Git-Tag: rel_0_5_7~34 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=359ca48d7b3328eef38bd3355b03fb0109d30f8b;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - Changed the name of TrustedConnection to Trusted_Connection when constructing pyodbc connect arguments [ticket:1561] --- diff --git a/CHANGES b/CHANGES index 49e3e2b232..5212f0450d 100644 --- a/CHANGES +++ b/CHANGES @@ -28,6 +28,11 @@ CHANGES via a new postgres.PGDoublePrecision object. This is postgresql.DOUBLE_PRECISION in 0.6. [ticket:1085] + +- mssql + - Changed the name of TrustedConnection to + Trusted_Connection when constructing pyodbc connect + arguments [ticket:1561] 0.5.6 ===== diff --git a/lib/sqlalchemy/databases/mssql.py b/lib/sqlalchemy/databases/mssql.py index d963b74770..acd81408e4 100644 --- a/lib/sqlalchemy/databases/mssql.py +++ b/lib/sqlalchemy/databases/mssql.py @@ -42,7 +42,7 @@ Examples of pyodbc connection string URLs: * *mssql://mydsn* - connects using the specified DSN named ``mydsn``. The connection string that is created will appear like:: - dsn=mydsn;TrustedConnection=Yes + dsn=mydsn;Trusted_Connection=Yes * *mssql://user:pass@mydsn* - connects using the DSN named ``mydsn`` passing in the ``UID`` and ``PWD`` information. The @@ -1451,7 +1451,7 @@ class MSSQLDialect_pyodbc(MSSQLDialect): connectors.append("UID=%s" % user) connectors.append("PWD=%s" % keys.pop('password', '')) else: - connectors.append("TrustedConnection=Yes") + connectors.append("Trusted_Connection=Yes") # if set to 'Yes', the ODBC layer will try to automagically convert # textual data from your database encoding to your client encoding diff --git a/test/dialect/test_mssql.py b/test/dialect/test_mssql.py index dd86ce0de2..5a69f09dae 100644 --- a/test/dialect/test_mssql.py +++ b/test/dialect/test_mssql.py @@ -519,13 +519,13 @@ class ParseConnectTest(TestBase, AssertsCompiledSQL): u = url.make_url('mssql://mydsn') dialect = mssql.MSSQLDialect_pyodbc() connection = dialect.create_connect_args(u) - eq_([['dsn=mydsn;TrustedConnection=Yes'], {}], connection) + eq_([['dsn=mydsn;Trusted_Connection=Yes'], {}], connection) def test_pyodbc_connect_old_style_dsn_trusted(self): u = url.make_url('mssql:///?dsn=mydsn') dialect = mssql.MSSQLDialect_pyodbc() connection = dialect.create_connect_args(u) - eq_([['dsn=mydsn;TrustedConnection=Yes'], {}], connection) + eq_([['dsn=mydsn;Trusted_Connection=Yes'], {}], connection) def test_pyodbc_connect_dsn_non_trusted(self): u = url.make_url('mssql://username:password@mydsn')