]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Intercept unresolveable comparator attrbute error for attr access
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 16 Jul 2019 17:02:16 +0000 (13:02 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 17 Jul 2019 14:42:17 +0000 (10:42 -0400)
commitcfac04da2a2152b01c4fc8e7c80cffa830595dec
treeca08a18bc8ae40ac17ed5c91accf1ea6e8aa6b38
parent7e161e8347d01a9b031295928c04b49879056ae3
Intercept unresolveable comparator attrbute error for attr access

Fixed bug where a synonym created against a mapped attribute that does not
exist yet, as is the case when it refers to backref before mappers are
configured, would raise recursion errors when trying to test for attributes
on it which ultimately don't exist (as occurs when the classes are run
through Sphinx autodoc), as the unconfigured state of the synonym would put
it into an attribute not found loop.

Fixes: #4767
Change-Id: I9aade8628349fbf538181a0049416cec0a17179c
(cherry picked from commit 234723fa296c9fa7ac63f1c4d877edc7ba120edd)
doc/build/changelog/unreleased_13/4767.rst [new file with mode: 0644]
lib/sqlalchemy/orm/attributes.py
test/orm/test_mapper.py