]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- rename _InspectionAttr to InspectionAttr
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 13 Aug 2014 22:47:52 +0000 (18:47 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 13 Aug 2014 22:47:52 +0000 (18:47 -0400)
doc/build/orm/internals.rst
lib/sqlalchemy/ext/associationproxy.py
lib/sqlalchemy/ext/hybrid.py
lib/sqlalchemy/orm/attributes.py
lib/sqlalchemy/orm/base.py
lib/sqlalchemy/orm/instrumentation.py
lib/sqlalchemy/orm/interfaces.py
lib/sqlalchemy/orm/mapper.py
lib/sqlalchemy/orm/state.py
lib/sqlalchemy/orm/util.py

index 857ea78d56736c63c355297cda654014a5935d4d..0283f6cac8dd3f396e8a313ebe5876d044d4fd8b 100644 (file)
@@ -27,7 +27,7 @@ sections, are listed here.
     :members:
 
 
-.. autoclass:: sqlalchemy.orm.interfaces._InspectionAttr
+.. autoclass:: sqlalchemy.orm.interfaces.InspectionAttr
     :members:
 
 
index a987ab413440eed58ceefaa4928adf4718354900..1aa68ac3275f3032c30efab69056ec5e5f5dd048 100644 (file)
@@ -77,16 +77,16 @@ def association_proxy(target_collection, attr, **kw):
 
 
 ASSOCIATION_PROXY = util.symbol('ASSOCIATION_PROXY')
-"""Symbol indicating an :class:`_InspectionAttr` that's
+"""Symbol indicating an :class:`InspectionAttr` that's
     of type :class:`.AssociationProxy`.
 
-   Is assigned to the :attr:`._InspectionAttr.extension_type`
+   Is assigned to the :attr:`.InspectionAttr.extension_type`
    attibute.
 
 """
 
 
-class AssociationProxy(interfaces._InspectionAttr):
+class AssociationProxy(interfaces.InspectionAttr):
     """A descriptor that presents a read/write view of an object attribute."""
 
     is_attribute = False
index 9f4e09e9261863500b64527413d806861038206d..e2739d1de0fc11681a8f21fbb1311c7a8567cced 100644 (file)
@@ -634,10 +634,10 @@ from .. import util
 from ..orm import attributes, interfaces
 
 HYBRID_METHOD = util.symbol('HYBRID_METHOD')
-"""Symbol indicating an :class:`_InspectionAttr` that's
+"""Symbol indicating an :class:`InspectionAttr` that's
    of type :class:`.hybrid_method`.
 
-   Is assigned to the :attr:`._InspectionAttr.extension_type`
+   Is assigned to the :attr:`.InspectionAttr.extension_type`
    attibute.
 
    .. seealso::
@@ -647,10 +647,10 @@ HYBRID_METHOD = util.symbol('HYBRID_METHOD')
 """
 
 HYBRID_PROPERTY = util.symbol('HYBRID_PROPERTY')
-"""Symbol indicating an :class:`_InspectionAttr` that's
+"""Symbol indicating an :class:`InspectionAttr` that's
     of type :class:`.hybrid_method`.
 
-   Is assigned to the :attr:`._InspectionAttr.extension_type`
+   Is assigned to the :attr:`.InspectionAttr.extension_type`
    attibute.
 
    .. seealso::
@@ -660,7 +660,7 @@ HYBRID_PROPERTY = util.symbol('HYBRID_PROPERTY')
 """
 
 
-class hybrid_method(interfaces._InspectionAttr):
+class hybrid_method(interfaces.InspectionAttr):
     """A decorator which allows definition of a Python object method with both
     instance-level and class-level behavior.
 
@@ -703,7 +703,7 @@ class hybrid_method(interfaces._InspectionAttr):
         return self
 
 
-class hybrid_property(interfaces._InspectionAttr):
+class hybrid_property(interfaces.InspectionAttr):
     """A decorator which allows definition of a Python descriptor with both
     instance-level and class-level behavior.
 
index 67e4dca9b5f0ba8bcc57abc880f57bf76f0274ba..66197ba0efa30aaf4b104d7dbdc5b55826f48089 100644 (file)
@@ -30,7 +30,7 @@ from .base import state_str, instance_str
 
 @inspection._self_inspects
 class QueryableAttribute(interfaces._MappedAttribute,
-                         interfaces._InspectionAttr,
+                         interfaces.InspectionAttr,
                          interfaces.PropComparator):
     """Base class for :term:`descriptor` objects that intercept
     attribute events on behalf of a :class:`.MapperProperty`
index 421d79630cd0dbaf59947662e0f850e6f80f1d85..3097b8590f6da26d2996b1531dc7dda57d76ac4f 100644 (file)
@@ -173,10 +173,10 @@ MANYTOMANY = util.symbol(
 
 NOT_EXTENSION = util.symbol(
     'NOT_EXTENSION',
-    """Symbol indicating an :class:`_InspectionAttr` that's
+    """Symbol indicating an :class:`InspectionAttr` that's
     not part of sqlalchemy.ext.
 
-    Is assigned to the :attr:`._InspectionAttr.extension_type`
+    Is assigned to the :attr:`.InspectionAttr.extension_type`
     attibute.
 
     """)
@@ -423,7 +423,7 @@ def class_mapper(class_, configure=True):
         return mapper
 
 
-class _InspectionAttr(object):
+class InspectionAttr(object):
     """A base class applied to all ORM objects that can be returned
     by the :func:`.inspect` function.
 
@@ -460,7 +460,7 @@ class _InspectionAttr(object):
     :class:`.QueryableAttribute` which handles attributes events on behalf
     of a :class:`.MapperProperty`.   But can also be an extension type
     such as :class:`.AssociationProxy` or :class:`.hybrid_property`.
-    The :attr:`._InspectionAttr.extension_type` will refer to a constant
+    The :attr:`.InspectionAttr.extension_type` will refer to a constant
     identifying the specific subtype.
 
     .. seealso::
index f58b8807f5fc7494ffd92abe21c5d02ba541c0ab..eb5b65baad830c7f611f869f17769e99d0ecab10 100644 (file)
@@ -97,7 +97,7 @@ class ClassManager(dict):
 
     def _all_sqla_attributes(self, exclude=None):
         """return an iterator of all classbound attributes that are
-        implement :class:`._InspectionAttr`.
+        implement :class:`.InspectionAttr`.
 
         This includes :class:`.QueryableAttribute` as well as extension
         types such as :class:`.hybrid_property` and
@@ -110,7 +110,7 @@ class ClassManager(dict):
             for key in set(supercls.__dict__).difference(exclude):
                 exclude.add(key)
                 val = supercls.__dict__[key]
-                if isinstance(val, interfaces._InspectionAttr):
+                if isinstance(val, interfaces.InspectionAttr):
                     yield key, val
 
     def _attr_has_impl(self, key):
index d95b78f24457924586cc9f97a01872a6410cf47d..2dfaf62430571b15421fedae436b6cafd9bf8f5c 100644 (file)
@@ -23,7 +23,7 @@ from .. import util
 from ..sql import operators
 from .base import (ONETOMANY, MANYTOONE, MANYTOMANY,
                    EXT_CONTINUE, EXT_STOP, NOT_EXTENSION)
-from .base import _InspectionAttr, _MappedAttribute
+from .base import InspectionAttr, _MappedAttribute
 import collections
 
 # imported later
@@ -47,7 +47,7 @@ __all__ = (
 )
 
 
-class MapperProperty(_MappedAttribute, _InspectionAttr):
+class MapperProperty(_MappedAttribute, InspectionAttr):
     """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,
index 7e5166393dbdf047cdc831b9f056776bef866762..06ec2bf144c64ed50ddc4a117d36808824cefa35 100644 (file)
@@ -26,7 +26,7 @@ from ..sql import expression, visitors, operators, util as sql_util
 from . import instrumentation, attributes, exc as orm_exc, loading
 from . import properties
 from . import util as orm_util
-from .interfaces import MapperProperty, _InspectionAttr, _MappedAttribute
+from .interfaces import MapperProperty, InspectionAttr, _MappedAttribute
 
 from .base import _class_to_mapper, _state_mapper, class_mapper, \
     state_str, _INSTRUMENTOR
@@ -52,7 +52,7 @@ _CONFIGURE_MUTEX = util.threading.RLock()
 
 @inspection._self_inspects
 @log.class_logger
-class Mapper(_InspectionAttr):
+class Mapper(InspectionAttr):
     """Define the correlation of class attributes to database table
     columns.
 
@@ -1979,7 +1979,7 @@ class Mapper(_InspectionAttr):
 
     @util.memoized_property
     def all_orm_descriptors(self):
-        """A namespace of all :class:`._InspectionAttr` attributes associated
+        """A namespace of all :class:`.InspectionAttr` attributes associated
         with the mapped class.
 
         These attributes are in all cases Python :term:`descriptors`
@@ -1988,13 +1988,13 @@ class Mapper(_InspectionAttr):
         This namespace includes attributes that are mapped to the class
         as well as attributes declared by extension modules.
         It includes any Python descriptor type that inherits from
-        :class:`._InspectionAttr`.  This includes
+        :class:`.InspectionAttr`.  This includes
         :class:`.QueryableAttribute`, as well as extension types such as
         :class:`.hybrid_property`, :class:`.hybrid_method` and
         :class:`.AssociationProxy`.
 
         To distinguish between mapped attributes and extension attributes,
-        the attribute :attr:`._InspectionAttr.extension_type` will refer
+        the attribute :attr:`.InspectionAttr.extension_type` will refer
         to a constant that distinguishes between different extension types.
 
         When dealing with a :class:`.QueryableAttribute`, the
index a9024b468d17a379bce7ee9a0ed3d838dabfbe3d..fe8ccd222b4eec4cc9b5a5d8698ccb8e78e9e4c9 100644 (file)
@@ -21,7 +21,7 @@ from .base import PASSIVE_NO_RESULT, SQL_OK, NEVER_SET, ATTR_WAS_SET, \
 from . import base
 
 
-class InstanceState(interfaces._InspectionAttr):
+class InstanceState(interfaces.InspectionAttr):
     """tracks state information at the instance level.
 
     The :class:`.InstanceState` is a key object used by the
index 215de5f4b991eb90c71674e3fa5c30717dbbcbcf..ea7bfc2948bd7efe297ad5941e25dc84711ed0a6 100644 (file)
@@ -15,7 +15,7 @@ import re
 from .base import instance_str, state_str, state_class_str, attribute_str, \
     state_attribute_str, object_mapper, object_state, _none_set
 from .base import class_mapper, _class_to_mapper
-from .base import _InspectionAttr
+from .base import InspectionAttr
 from .path_registry import PathRegistry
 
 all_cascades = frozenset(("delete", "delete-orphan", "all", "merge",
@@ -412,7 +412,7 @@ class AliasedClass(object):
             id(self), self._aliased_insp._target.__name__)
 
 
-class AliasedInsp(_InspectionAttr):
+class AliasedInsp(InspectionAttr):
     """Provide an inspection interface for an
     :class:`.AliasedClass` object.