From e5d0fa94937b6572bbf4a08d4a8870e749fcea03 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 10 Jul 2014 11:26:13 -0400 Subject: - The :meth:`.TypeEngine.with_variant` method will now accept a type class as an argument which is internally converted to an instance, using the same convention long established by other constructs such as :class:`.Column`. fixes #3122 --- lib/sqlalchemy/sql/type_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/type_api.py b/lib/sqlalchemy/sql/type_api.py index 6fa0bc64a..f9af21baa 100644 --- a/lib/sqlalchemy/sql/type_api.py +++ b/lib/sqlalchemy/sql/type_api.py @@ -263,7 +263,7 @@ class TypeEngine(Visitable): .. versionadded:: 0.7.2 """ - return Variant(self, {dialect_name: type_}) + return Variant(self, {dialect_name: to_instance(type_)}) @util.memoized_property -- cgit v1.2.1