]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- doc fixes
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 6 Jan 2015 16:45:17 +0000 (11:45 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 6 Jan 2015 16:45:17 +0000 (11:45 -0500)
lib/sqlalchemy/orm/base.py
lib/sqlalchemy/orm/interfaces.py

index c5c8c5e2e45a5ab71b739eea74906501567333ff..7bfafdc2bbc0b04a48c2d01265fd6d0118758910 100644 (file)
@@ -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::
 
index 346e2412e8dac5f503ec1ec7c987d985f7e88c20..299ccaaafa7768d16a1fa19df174d4845da277bd 100644 (file)
@@ -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.