summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLele Gaifax <lele@metapensiero.it>2022-11-27 14:44:13 -0500
committersqla-tester <sqla-tester@sqlalchemy.org>2022-11-27 14:44:13 -0500
commit771a5d1a4b517fe56d79caf254e10c12024295ef (patch)
tree818095108c18dc36fc601b9800303c19c805de76 /doc
parentdb2344b0a2a9ef164651d645a8da2d7a9d1bc250 (diff)
downloadsqlalchemy-771a5d1a4b517fe56d79caf254e10c12024295ef.tar.gz
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
Diffstat (limited to 'doc')
-rw-r--r--doc/build/changelog/unreleased_20/8765.rst10
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/build/changelog/unreleased_20/8765.rst b/doc/build/changelog/unreleased_20/8765.rst
index a210fb348..1f7fe144b 100644
--- a/doc/build/changelog/unreleased_20/8765.rst
+++ b/doc/build/changelog/unreleased_20/8765.rst
@@ -6,5 +6,11 @@
``adjacent_to()``, ``difference()``, ``union()``, etc., were added to the
PG-specific range objects, bringing them in par with the standard
operators implemented by the underlying
- :attr:`_postgresql.AbstractRange.comparator_factory`. Pull request
- courtesy Lele Gaifax.
+ :attr:`_postgresql.AbstractRange.comparator_factory`.
+
+ In addition, the ``__bool__()_`` method of the class has been corrected to
+ be consistent with the common Python *containers* behavior as well as how
+ other popular PostgreSQL drivers do: it now tells whether the range
+ instance is *not* empty, rather than the other way around.
+
+ Pull request courtesy Lele Gaifax.