From: jonathan vanasco Date: Wed, 8 Sep 2021 16:39:02 +0000 (-0400) Subject: Fixes: #6930 X-Git-Tag: rel_1_4_24~21^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=798fb1910fac737d81b7cf1a4f3c256af8456e58;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Fixes: #6930 Note in docstrings that ignored kwargs are required for API conformance. Change-Id: Icc9a8c63c0936a7c5255841ef49d10a83496763a --- diff --git a/lib/sqlalchemy/dialects/postgresql/array.py b/lib/sqlalchemy/dialects/postgresql/array.py index 1b036ac323..3cb60d3f3b 100644 --- a/lib/sqlalchemy/dialects/postgresql/array.py +++ b/lib/sqlalchemy/dialects/postgresql/array.py @@ -221,6 +221,9 @@ class ARRAY(sqltypes.ARRAY): def contains(self, other, **kwargs): """Boolean expression. Test if elements are a superset of the elements of the argument array expression. + + kwargs may be ignored by this operator but are required for API + conformance. """ return self.operate(CONTAINS, other, result_type=sqltypes.Boolean) diff --git a/lib/sqlalchemy/dialects/postgresql/hstore.py b/lib/sqlalchemy/dialects/postgresql/hstore.py index 30e2d4bc27..a4090f1ac5 100644 --- a/lib/sqlalchemy/dialects/postgresql/hstore.py +++ b/lib/sqlalchemy/dialects/postgresql/hstore.py @@ -170,6 +170,9 @@ class HSTORE(sqltypes.Indexable, sqltypes.Concatenable, sqltypes.TypeEngine): def contains(self, other, **kwargs): """Boolean expression. Test if keys (or array) are a superset of/contained the keys of the argument jsonb expression. + + kwargs may be ignored by this operator but are required for API + conformance. """ return self.operate(CONTAINS, other, result_type=sqltypes.Boolean) diff --git a/lib/sqlalchemy/dialects/postgresql/json.py b/lib/sqlalchemy/dialects/postgresql/json.py index 2277d3cbe0..2acf177f53 100644 --- a/lib/sqlalchemy/dialects/postgresql/json.py +++ b/lib/sqlalchemy/dialects/postgresql/json.py @@ -310,6 +310,9 @@ class JSONB(JSON): def contains(self, other, **kwargs): """Boolean expression. Test if keys (or array) are a superset of/contained the keys of the argument jsonb expression. + + kwargs may be ignored by this operator but are required for API + conformance. """ return self.operate(CONTAINS, other, result_type=sqltypes.Boolean) diff --git a/lib/sqlalchemy/dialects/postgresql/ranges.py b/lib/sqlalchemy/dialects/postgresql/ranges.py index f251a04bd7..c54179c818 100644 --- a/lib/sqlalchemy/dialects/postgresql/ranges.py +++ b/lib/sqlalchemy/dialects/postgresql/ranges.py @@ -42,6 +42,9 @@ class RangeOperators(object): """Boolean expression. Returns true if the right hand operand, which can be an element or a range, is contained within the column. + + kwargs may be ignored by this operator but are required for API + conformance. """ return self.expr.op("@>", is_comparison=True)(other) diff --git a/lib/sqlalchemy/orm/relationships.py b/lib/sqlalchemy/orm/relationships.py index b44a161022..35dbfc3794 100644 --- a/lib/sqlalchemy/orm/relationships.py +++ b/lib/sqlalchemy/orm/relationships.py @@ -1539,6 +1539,8 @@ class RelationshipProperty(StrategizedProperty): as well as :ref:`ormtutorial_joins` for more details on constructing outer joins. + kwargs may be ignored by this operator but are required for API + conformance. """ if not self.property.uselist: raise sa_exc.InvalidRequestError(