]> 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 19:44:13 +0000 (14:44 -0500)
committersqla-tester <sqla-tester@sqlalchemy.org>
Sun, 27 Nov 2022 19:44:13 +0000 (14:44 -0500)
commit771a5d1a4b517fe56d79caf254e10c12024295ef
tree818095108c18dc36fc601b9800303c19c805de76
parentdb2344b0a2a9ef164651d645a8da2d7a9d1bc250
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.

Closes: #8885
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/8885
Pull-request-sha: 5670cdb920692a62f77b7b6ea312784033de83d9

Change-Id: I6f4a40168b2f037c578e84f7550370411bd42160
doc/build/changelog/unreleased_20/8765.rst
lib/sqlalchemy/dialects/postgresql/ranges.py
test/dialect/postgresql/test_types.py