From: Mike Bayer Date: Tue, 6 Jan 2015 16:45:17 +0000 (-0500) Subject: - doc fixes X-Git-Tag: rel_1_0_0b1~120 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b8a8cdd1ff47b5774662f4c61fe49382b967de02;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - doc fixes --- diff --git a/lib/sqlalchemy/orm/base.py b/lib/sqlalchemy/orm/base.py index c5c8c5e2e4..7bfafdc2bb 100644 --- a/lib/sqlalchemy/orm/base.py +++ b/lib/sqlalchemy/orm/base.py @@ -491,7 +491,11 @@ class InspectionAttr(object): class InspectionAttrInfo(InspectionAttr): - """Adds the ``.info`` attribute to :class:`.Inspectionattr`. + """Adds the ``.info`` attribute to :class:`.InspectionAttr`. + + The rationale for :class:`.InspectionAttr` vs. :class:`.InspectionAttrInfo` + is that the former is compatible as a mixin for classes that specify + ``__slots__``; this is essentially an implementation artifact. """ @@ -508,9 +512,10 @@ class InspectionAttrInfo(InspectionAttr): .. versionadded:: 0.8 Added support for .info to all :class:`.MapperProperty` subclasses. - .. versionchanged:: 1.0.0 :attr:`.InspectionAttr.info` moved - from :class:`.MapperProperty` so that it can apply to a wider - variety of ORM and extension constructs. + .. versionchanged:: 1.0.0 :attr:`.MapperProperty.info` is also + available on extension types via the + :attr:`.InspectionAttrInfo.info` attribute, so that it can apply + to a wider variety of ORM and extension constructs. .. seealso:: diff --git a/lib/sqlalchemy/orm/interfaces.py b/lib/sqlalchemy/orm/interfaces.py index 346e2412e8..299ccaaafa 100644 --- a/lib/sqlalchemy/orm/interfaces.py +++ b/lib/sqlalchemy/orm/interfaces.py @@ -50,10 +50,7 @@ __all__ = ( class MapperProperty(_MappedAttribute, InspectionAttr, util.MemoizedSlots): - """Manage the relationship of a ``Mapper`` to a single class - attribute, as well as that attribute as it appears on individual - instances of the class, including attribute instrumentation, - attribute access, loading behavior, and dependency calculations. + """Represent a particular class attribute mapped by :class:`.Mapper`. The most common occurrences of :class:`.MapperProperty` are the mapped :class:`.Column`, which is represented in a mapping as @@ -96,9 +93,10 @@ class MapperProperty(_MappedAttribute, InspectionAttr, util.MemoizedSlots): .. versionadded:: 0.8 Added support for .info to all :class:`.MapperProperty` subclasses. - .. versionchanged:: 1.0.0 :attr:`.InspectionAttr.info` moved - from :class:`.MapperProperty` so that it can apply to a wider - variety of ORM and extension constructs. + .. versionchanged:: 1.0.0 :attr:`.MapperProperty.info` is also + available on extension types via the + :attr:`.InspectionAttrInfo.info` attribute, so that it can apply + to a wider variety of ORM and extension constructs. .. seealso:: @@ -109,7 +107,6 @@ class MapperProperty(_MappedAttribute, InspectionAttr, util.MemoizedSlots): """ return {} - def setup(self, context, entity, path, adapter, **kwargs): """Called by Query for the purposes of constructing a SQL statement.