From 6cd195c4a1589620784b052a041e691427d1e086 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 25 Feb 2021 16:18:12 -0500 Subject: implement visit_unsupported_compilation for TypeCompiler Fixed regression where the "unsupported compilation error" for unknown datatypes would fail to raise correctly. Fixes: #5979 Change-Id: I984fe95666813832ab5bdfc568322e2aa7cc3db0 --- lib/sqlalchemy/sql/compiler.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index 763b4cabb..c4577e397 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -550,6 +550,12 @@ class TypeCompiler(util.with_metaclass(util.EnsureKWArgType, object)): def process(self, type_, **kw): return type_._compiler_dispatch(self, **kw) + def visit_unsupported_compilation(self, element, err, **kw): + util.raise_( + exc.UnsupportedCompilationError(self, element), + replace_context=err, + ) + # this was a Visitable, but to allow accurate detection of # column elements this is actually a column element -- cgit v1.2.1