From 05f34fc29c9ce6ad1603d1538405f18f08c42df2 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 11 Feb 2021 17:51:15 -0500 Subject: test Function(?:Element)._bind_param() with in_() Fixed 1.4 regression where the :meth:`_functions.Function.in_` method was not covered by tests and failed to function properly in all cases. Fixes: #5934 Change-Id: I93423a296e391aabd5594cb670d36b91ced0231d --- lib/sqlalchemy/sql/functions.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/functions.py b/lib/sqlalchemy/sql/functions.py index 78f7ead2e..641715327 100644 --- a/lib/sqlalchemy/sql/functions.py +++ b/lib/sqlalchemy/sql/functions.py @@ -595,7 +595,7 @@ class FunctionElement(Executable, ColumnElement, FromClause, Generative): """ return self.select().execute() - def _bind_param(self, operator, obj, type_=None): + def _bind_param(self, operator, obj, type_=None, **kw): return BindParameter( None, obj, @@ -603,6 +603,7 @@ class FunctionElement(Executable, ColumnElement, FromClause, Generative): _compared_to_type=self.type, unique=True, type_=type_, + **kw ) def self_group(self, against=None): @@ -887,7 +888,7 @@ class Function(FunctionElement): ) return kw["bind"] - def _bind_param(self, operator, obj, type_=None): + def _bind_param(self, operator, obj, type_=None, **kw): return BindParameter( self.name, obj, @@ -895,6 +896,7 @@ class Function(FunctionElement): _compared_to_type=self.type, type_=type_, unique=True, + **kw ) -- cgit v1.2.1