From 29bb0272dcadb547b2a68d4dc393b436259c9018 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 25 Apr 2019 17:24:27 -0500 Subject: [PATCH] remote_attr and local_attr refer to class bound attributes, not MapperProperty backport from master Change-Id: If3ffe0945f47010e1ddecabfc27a6e7707031fd9 (cherry picked from commit bcf2d5826ce8b1c68ee346154e86a4ecc9ac61c7) --- lib/sqlalchemy/ext/associationproxy.py | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/lib/sqlalchemy/ext/associationproxy.py b/lib/sqlalchemy/ext/associationproxy.py index 4fdac827af..8c048bf1ff 100644 --- a/lib/sqlalchemy/ext/associationproxy.py +++ b/lib/sqlalchemy/ext/associationproxy.py @@ -161,32 +161,28 @@ class AssociationProxy(interfaces.InspectionAttrInfo): @property def remote_attr(self): - """The 'remote' :class:`.MapperProperty` referenced by this + """The 'remote' class attribute referenced by this :class:`.AssociationProxy`. - .. versionadded:: 0.7.3 - - See also: + .. seealso:: - :attr:`.AssociationProxy.attr` + :attr:`.AssociationProxy.attr` - :attr:`.AssociationProxy.local_attr` + :attr:`.AssociationProxy.local_attr` """ return getattr(self.target_class, self.value_attr) @property def local_attr(self): - """The 'local' :class:`.MapperProperty` referenced by this + """The 'local' class attribute referenced by this :class:`.AssociationProxy`. - .. versionadded:: 0.7.3 - - See also: + .. seealso:: - :attr:`.AssociationProxy.attr` + :attr:`.AssociationProxy.attr` - :attr:`.AssociationProxy.remote_attr` + :attr:`.AssociationProxy.remote_attr` """ return getattr(self.owning_class, self.target_collection) -- 2.47.2