merge default

This commit is contained in:
Mike Bayer
2013-04-29 19:50:49 -04:00
4 changed files with 19 additions and 15 deletions
+10
View File
@@ -3,6 +3,16 @@
0.8 Changelog
==============
.. changelog::
:version: 0.8.2
.. change::
:tags: bug, mysql
Updated mysqlconnector dialect to check for disconnect based
on the apparent string message sent in the exception; tested
against mysqlconnector 1.0.9.
.. changelog::
:version: 0.8.1
:released: April 27, 2013
+1 -1
View File
@@ -120,7 +120,7 @@ from .engine import create_engine, engine_from_config
__all__ = sorted(name for name, obj in list(locals().items())
if not (name.startswith('_') or _inspect.ismodule(obj)))
__version__ = '0.8.1'
__version__ = '0.8.2'
del _inspect, sys
@@ -113,7 +113,8 @@ class MySQLDialect_mysqlconnector(MySQLDialect):
errnos = (2006, 2013, 2014, 2045, 2055, 2048)
exceptions = (self.dbapi.OperationalError, self.dbapi.InterfaceError)
if isinstance(e, exceptions):
return e.errno in errnos
return e.errno in errnos or \
"MySQL Connection not available." in str(e)
else:
return False
+6 -13
View File
@@ -617,19 +617,12 @@ class InvalidateDuringResultTest(fixtures.TestBase):
meta.drop_all()
engine.dispose()
@testing.fails_on('+cymysql',
"Buffers the result set and doesn't check for "
"connection close")
@testing.fails_on('+pymysql',
"Buffers the result set and doesn't check for "
"connection close")
@testing.fails_on('+mysqldb',
"Buffers the result set and doesn't check for "
"connection close")
@testing.fails_on('+pg8000',
"Buffers the result set and doesn't check for "
"connection close")
@testing.fails_on('+informixdb',
@testing.fails_if([
'+mysqlconnector', '+mysqldb'
'+cymysql', '+pymysql', '+pg8000'
], "Buffers the result set and doesn't check for "
"connection close")
@testing.fails_if('+informixdb',
"Wrong error thrown, fix in informixdb?")
def test_invalidate_on_results(self):
conn = engine.connect()