From: Mike Bayer Date: Thu, 25 Apr 2019 22:24:27 +0000 (-0500) Subject: remote_attr and local_attr refer to class bound attributes, not MapperProperty X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29bb0272dcadb547b2a68d4dc393b436259c9018;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git remote_attr and local_attr refer to class bound attributes, not MapperProperty backport from master Change-Id: If3ffe0945f47010e1ddecabfc27a6e7707031fd9 (cherry picked from commit bcf2d5826ce8b1c68ee346154e86a4ecc9ac61c7) --- 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)