From dbcaeb54e31517fe88f6f8c515f1024002675f13 Mon Sep 17 00:00:00 2001 From: Stephen Rosen Date: Fri, 7 May 2021 18:54:32 +0000 Subject: [PATCH] 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`. --- lib/sqlalchemy/exc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.47.2