]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
correctly apply _set_binops_check_strict to AssociationProxy
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 2 May 2024 23:05:08 +0000 (19:05 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 2 May 2024 23:24:34 +0000 (19:24 -0400)
commit01fbe18d5cb3009400d38a5d1d67f62ae4bfacc0
tree682a5f05e64fc2f41e8d0860a5d9bead8cd8d427
parent8f63944be88d494ea883017ee3a3bd44d4e1095e
correctly apply _set_binops_check_strict to AssociationProxy

Revised the set "binary" operators for the association proxy ``set()``
interface to correctly raise ``TypeError`` for invalid use of the ``|``,
``&``, ``^``, and ``-`` operators, as well as the in-place mutation
versions of these methods, to match the behavior of standard Python
``set()`` as well as SQLAlchemy ORM's "intstrumented" set implementation.

Fixes: #11349
Change-Id: I02442f8885107d115b7ecfa1ca716835a55d4db3
doc/build/changelog/unreleased_21/11349.rst [new file with mode: 0644]
lib/sqlalchemy/ext/associationproxy.py
lib/sqlalchemy/orm/collections.py
test/ext/test_associationproxy.py
test/orm/test_collection.py