diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-01-06 11:45:17 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-01-06 11:45:17 -0500 |
commit | b8a8cdd1ff47b5774662f4c61fe49382b967de02 (patch) | |
tree | ff331697d02ae1b48da32ba3e9050756465cdd3f | |
parent | 67778e20624bfb63990ff67598f911768867e439 (diff) | |
download | sqlalchemy-b8a8cdd1ff47b5774662f4c61fe49382b967de02.tar.gz |
- doc fixes
-rw-r--r-- | lib/sqlalchemy/orm/base.py | 13 | ||||
-rw-r--r-- | lib/sqlalchemy/orm/interfaces.py | 13 |
2 files changed, 14 insertions, 12 deletions
diff --git a/lib/sqlalchemy/orm/base.py b/lib/sqlalchemy/orm/base.py index c5c8c5e2e..7bfafdc2b 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 346e2412e..299ccaaaf 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. |