]> 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:05 +0000 (10:42 -0400)
commit234723fa296c9fa7ac63f1c4d877edc7ba120edd
tree103309417ca72507e5e951a81e7cc083a75395b6
parent1a9f5754e088ff521bf41bddc42b32ec989a8877
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
doc/build/changelog/unreleased_13/4767.rst [new file with mode: 0644]
lib/sqlalchemy/orm/attributes.py
test/orm/test_mapper.py