]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Fix equality comparison between a PG Range and a different class instance
authorLele Gaifax <lele@metapensiero.it>
Thu, 15 Dec 2022 09:27:03 +0000 (04:27 -0500)
committersqla-tester <sqla-tester@sqlalchemy.org>
Thu, 15 Dec 2022 09:27:03 +0000 (04:27 -0500)
commitf217a5c337ff8bf76edf96b3b38c91dceeebf67f
tree76bc3886d81f4a4bc9efb4e82b11ed140dcc627c
parent0f5b3040a419fad404d3e2ea8abfb781be228066
Fix equality comparison between a PG Range and a different class instance

This fixes issue #8984, making the method `Range.__eq__` return `NotImplemented` when the argument is an instance of a different class.

Closes: #8985
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/8985
Pull-request-sha: b8f601f038a2203af02a99ab190ebbc1c489549a

Change-Id: Iaf0b651a22a9f346c8f18b3a53e3339bf61bb33f
doc/build/changelog/unreleased_20/8984.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/postgresql/ranges.py
test/dialect/postgresql/test_types.py