]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Rectify PG Range.__bool__, inverting previous logic
authorLele Gaifax <lele@metapensiero.it>
Sun, 27 Nov 2022 09:16:02 +0000 (10:16 +0100)
committerLele Gaifax <lele@metapensiero.it>
Sun, 27 Nov 2022 09:16:02 +0000 (10:16 +0100)
commit885068ec7b3fedd1052a7b1071fa84e81485dd6e
tree32d9f3bd6ccb94672c92a1acb7450b824c18cd8c
parent34e29f7b225cf1305e151af9d03ef95f42a9dbcc
Rectify PG Range.__bool__, inverting previous logic

The boolness of the range was defined to be equal to its emptiness. As
this has been identified as a typo rather than the intended, this
inverts the logic, to match common Python behaviour as well as how other
popular PG drivers do.
lib/sqlalchemy/dialects/postgresql/ranges.py
test/dialect/postgresql/test_types.py