wasn't implementing the sort properly, replaced
with the existing sort algorithm
+- pyodbc
+ - [bug] pyodbc-based dialects now parse the
+ pyodbc accurately as far as observed
+ pyodbc strings, including such gems
+ as "py3-3.0.1-beta4" [ticket:2318]
+
- postgresql
- [bug] Postgresql dialect memoizes that an ENUM of a
particular name was processed
use snapshot isolation instead :) )
[ticket:2336]
+ - [bug] use new pyodbc version detection for
+ _need_decimal_fix option, [ticket:2318]
+
- mysql
- [bug] Unicode adjustments allow latest pymysql
(post 0.4) to pass 100% on Python 2.
# run other initialization which asks for user name, etc.
super(PyODBCConnector, self).initialize(connection)
+ def _dbapi_version(self):
+ if not self.dbapi:
+ return ()
+ return self._parse_dbapi_version(self.dbapi.version)
+
+ def _parse_dbapi_version(self, vers):
+ m = re.match(
+ r'(?:py.*-)?([\d\.]+)(?:-(\w+))?',
+ vers
+ )
+ if not m:
+ return ()
+ vers = tuple([int(x) for x in m.group(1).split(".")])
+ if m.group(2):
+ vers += (m.group(2),)
+ return vers
+
def _get_server_version_info(self, connection):
dbapi_con = connection.connection
version = []
self.use_scope_identity = self.dbapi and \
hasattr(self.dbapi.Cursor, 'nextset')
self._need_decimal_fix = self.dbapi and \
- tuple(self.dbapi.version.split(".")) < (2, 1, 8)
+ self._dbapi_version() < (2, 1, 8)
dialect = MSDialect_pyodbc
--- /dev/null
+from test.lib.testing import eq_
+from sqlalchemy.connectors import pyodbc
+from test.lib import fixtures
+
+class PyODBCTest(fixtures.TestBase):
+ def test_pyodbc_version(self):
+ connector = pyodbc.PyODBCConnector()
+ for vers, expected in [
+ ('2.1.8', (2, 1, 8)),
+ ("py3-3.0.1-beta4", (3, 0, 1, 'beta4')),
+ ("10.15.17", (10, 15, 17)),
+ ("crap.crap.crap", ()),
+ ]:
+ eq_(
+ connector._parse_dbapi_version(vers),
+ expected
+ )
\ No newline at end of file