]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Fix serialization of UnsupportedCompilationError 7078/head
authorYutian Li <hotpxless@gmail.com>
Thu, 23 Sep 2021 17:33:56 +0000 (13:33 -0400)
committerYutian Li <hotpxless@gmail.com>
Thu, 23 Sep 2021 17:38:18 +0000 (13:38 -0400)
Fixes  #7077

lib/sqlalchemy/exc.py

index a24cf7ba49314c4746823934b391eadf8ebbb44c..978b2ebd095fa6634cf1dff7100ecb466cd335ae 100644 (file)
@@ -188,6 +188,12 @@ class UnsupportedCompilationError(CompileError):
             "Compiler %r can't render element of type %s%s"
             % (compiler, element_type, ": %s" % message if message else "")
         )
+        self.compiler = compiler
+        self.element_type = element_type
+        self.message = message
+
+    def __reduce__(self):
+        return self._class__, (self.compiler, self.element_type, self.message)
 
 
 class IdentifierError(SQLAlchemyError):