From: Stephen Rosen Date: Fri, 7 May 2021 18:54:32 +0000 (+0000) Subject: Make HasDescriptionCode work under py2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6250%2Fhead;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Make HasDescriptionCode work under py2 On py2.7, this class needs to inherit from `object` in order to use `super()`. Otherwise, it fails a check in `super()` that makes sure that its first element is a `type`. --- diff --git a/lib/sqlalchemy/exc.py b/lib/sqlalchemy/exc.py index 27e02bb899..5decbaba94 100644 --- a/lib/sqlalchemy/exc.py +++ b/lib/sqlalchemy/exc.py @@ -19,7 +19,7 @@ from .util import compat _version_token = None -class HasDescriptionCode: +class HasDescriptionCode(object): """helper which adds 'code' as an attribute and '_code_str' as a method""" code = None