mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-05-29 12:06:28 -04:00
merge default
This commit is contained in:
Vendored
+10
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user