[Sqlalchemy-tickets] Issue #4065: mysqlclient added internalerror for the interfaceerror issue (zzz
Brought to you by:
zzzeek
From: Michael B. <iss...@bi...> - 2017-09-01 16:26:03
|
New issue 4065: mysqlclient added internalerror for the interfaceerror issue https://bitbucket.org/zzzeek/sqlalchemy/issues/4065/mysqlclient-added-internalerror-for-the Michael Bayer: https://github.com/PyMySQL/mysqlclient-python/issues/202 means we need this for reconnect tests to pass: diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index 5b01b2c1f..e8cfcbae4 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -1785,7 +1785,7 @@ class MySQLDialect(default.DefaultDialect): self.dbapi.ProgrammingError)): return self._extract_error_code(e) in \ (2006, 2013, 2014, 2045, 2055) - elif isinstance(e, self.dbapi.InterfaceError): + elif isinstance(e, (self.dbapi.InterfaceError, self.dbapi.InternalError)): # if underlying connection is closed, # this is the error you get return "(0, '')" in str(e) might as well backport to 1.0. |