Files
sqlalchemy/test/sql
Federico Caselli 1de64504d8 Deprecate empty or_() and and_()
Creating an :func:`.and_` or :func:`.or_` construct with no arguments or
empty ``*args`` will now emit a deprecation warning, as the SQL produced is
a no-op (i.e. it renders as a blank string). This behavior is considered to
be non-intuitive, so for empty or possibly empty :func:`.and_` or
:func:`.or_` constructs, an appropriate default boolean should be included,
such as ``and_(True, *args)`` or ``or_(False, *args)``.   As has been the
case for many major versions of SQLAlchemy, these particular boolean
values will not render if the ``*args`` portion is non-empty.

As there are some internal cases where an empty and_() construct is used
in order to build an optional WHERE expression, a private
utility function is added to suit this use case.

Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Fixes: #5054
Closes: #5062
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/5062
Pull-request-sha: 5ca2f27281

Change-Id: I599b9c8befa64d9a59a35ad7dd84ff400e3aa647
2020-01-25 18:03:48 -05:00
..
2019-11-08 15:40:25 -05:00
2020-01-01 11:11:24 -05:00
2020-01-22 11:31:23 -05:00
2020-01-22 11:31:23 -05:00
2019-07-21 10:51:29 +10:00
2019-03-05 20:29:05 -05:00
2020-01-22 11:31:23 -05:00
2019-01-06 18:23:11 -05:00
2019-11-11 16:51:46 -05:00