]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Make HasDescriptionCode work under py2 6250/head
authorStephen Rosen <sirosen@globus.org>
Fri, 7 May 2021 18:54:32 +0000 (18:54 +0000)
committerStephen Rosen <sirosen@globus.org>
Fri, 7 May 2021 18:54:32 +0000 (18:54 +0000)
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

index 27e02bb899a208846fd533bdd7c85c4b376585e9..5decbaba948a1af08910af81b991993e613b9bc6 100644 (file)
@@ -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