]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
catch unexpected errors when accessing clslevel attribute
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 18 Mar 2022 14:33:40 +0000 (10:33 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 18 Mar 2022 14:38:36 +0000 (10:38 -0400)
commit7a93686ae47aca374a6ed29fdf1ae6cb5451cc63
tree37572781996bd7ea8f7084150554b5822999ea9a
parenta351643c6fe0f812a7e2ba9efb69a8dff6803ab9
catch unexpected errors when accessing clslevel attribute

Improved the error message that's raised for the case where the
:func:`.association_proxy` construct attempts to access a target attribute
at the class level, and this access fails. The particular use case here is
when proxying to a hybrid attribute that does not include a working
class-level implementation.

Fixes: #7827
Change-Id: Ic6ff9df010f49253e664a1e7c7e16d8546006965
(cherry picked from commit 764e36e5e7b7faf1a97b4b06be1ca307ac4fce46)
doc/build/changelog/unreleased_14/7827.rst [new file with mode: 0644]
lib/sqlalchemy/ext/associationproxy.py
test/ext/test_associationproxy.py