]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Move supports_sane_rowcount_returning = False to dialect level
authorGord Thompson <gord@gordthompson.com>
Mon, 11 May 2020 20:44:37 +0000 (14:44 -0600)
committerGord Thompson <gord@gordthompson.com>
Mon, 11 May 2020 20:44:37 +0000 (14:44 -0600)
Fixes: #5321
Change-Id: Id83e98e9013818424c133297a850746302633158

doc/build/changelog/unreleased_13/5321.rst [new file with mode: 0644]
lib/sqlalchemy/connectors/pyodbc.py
lib/sqlalchemy/dialects/mssql/pyodbc.py

diff --git a/doc/build/changelog/unreleased_13/5321.rst b/doc/build/changelog/unreleased_13/5321.rst
new file mode 100644 (file)
index 0000000..485afad
--- /dev/null
@@ -0,0 +1,7 @@
+.. change::
+    :tags: change, mssql
+    :tickets: 5321
+
+    Moved the ``supports_sane_rowcount_returning = False`` requirement from
+    the ``PyODBCConnector`` level to the ``MSDialect_pyodbc`` since pyodbc
+    does work properly in some circumstances.
index d0c11482202c93e4858ce84abcb49402c6303511..cd79a3ada02c7e874d5a7b83b4aad2c106be5ff4 100644 (file)
@@ -14,7 +14,8 @@ from .. import util
 class PyODBCConnector(Connector):
     driver = "pyodbc"
 
-    supports_sane_rowcount_returning = False
+    # this is no longer False for pyodbc in general
+    supports_sane_rowcount_returning = True
     supports_sane_multi_rowcount = False
 
     supports_unicode_statements = True
index 5cb92ef07448ec04468191e1dfd8aab2d1bad2b5..ff164e8868d6707274498db048640074483e770f 100644 (file)
@@ -314,6 +314,9 @@ class MSExecutionContext_pyodbc(MSExecutionContext):
 
 class MSDialect_pyodbc(PyODBCConnector, MSDialect):
 
+    # mssql still has problems with this on Linux
+    supports_sane_rowcount_returning = False
+
     execution_ctx_cls = MSExecutionContext_pyodbc
 
     colspecs = util.update_copy(