diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2022-01-06 19:15:06 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@ci3.zzzcomputing.com> | 2022-01-06 19:15:06 +0000 |
commit | dd5f9c2039731adb6c019c4cc3a39694f9b236ad (patch) | |
tree | ce80dd61476c0c09f792f5690c7c7434b7876cc7 /lib/sqlalchemy/sql/coercions.py | |
parent | f3c93170dcbe705da25bc18bad2b29620d82a490 (diff) | |
parent | 01c50c64e302c193733cef7fb146fbab8eaa44bd (diff) | |
download | sqlalchemy-dd5f9c2039731adb6c019c4cc3a39694f9b236ad.tar.gz |
Merge "Remove all remaining removed_in_20 warnings slated for removal" into main
Diffstat (limited to 'lib/sqlalchemy/sql/coercions.py')
-rw-r--r-- | lib/sqlalchemy/sql/coercions.py | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/lib/sqlalchemy/sql/coercions.py b/lib/sqlalchemy/sql/coercions.py index d11ab6712..fe4fc4b40 100644 --- a/lib/sqlalchemy/sql/coercions.py +++ b/lib/sqlalchemy/sql/coercions.py @@ -99,14 +99,15 @@ def _document_text_coercion(paramname, meth_rst, param_rst): def _expression_collection_was_a_list(attrname, fnname, args): if args and isinstance(args[0], (list, set, dict)) and len(args) == 1: if isinstance(args[0], list): - util.warn_deprecated_20( - 'The "%s" argument to %s(), when referring to a sequence ' + raise exc.ArgumentError( + f'The "{attrname}" argument to {fnname}(), when ' + "referring to a sequence " "of items, is now passed as a series of positional " - "elements, rather than as a list. " % (attrname, fnname) + "elements, rather than as a list. " ) return args[0] - else: - return args + + return args def expect( @@ -883,15 +884,6 @@ class StatementImpl(_CoerceLiterals, RoleImpl): original_element, resolved, argname=argname, **kw ) - def _text_coercion(self, element, argname=None): - util.warn_deprecated_20( - "Using plain strings to indicate SQL statements without using " - "the text() construct is " - "deprecated and will be removed in version 2.0. Ensure plain " - "SQL statements are passed using the text() construct." - ) - return elements.TextClause(element) - class SelectStatementImpl(_NoTextCoercion, RoleImpl): __slots__ = () |