]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Add some `Sphinx` paragraph level versions informations markups,
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 8 Jun 2012 19:59:25 +0000 (15:59 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 8 Jun 2012 19:59:25 +0000 (15:59 -0400)
such as ``.. versionadded::``, ``.. versionchanged::`` and ``.. deprecated::``.

28 files changed:
examples/declarative_reflection/__init__.py
lib/sqlalchemy/dialects/mssql/base.py
lib/sqlalchemy/dialects/mssql/pyodbc.py
lib/sqlalchemy/dialects/mysql/base.py
lib/sqlalchemy/dialects/oracle/base.py
lib/sqlalchemy/dialects/oracle/cx_oracle.py
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/dialects/postgresql/psycopg2.py
lib/sqlalchemy/dialects/sqlite/pysqlite.py
lib/sqlalchemy/engine/__init__.py
lib/sqlalchemy/engine/base.py
lib/sqlalchemy/events.py
lib/sqlalchemy/ext/associationproxy.py
lib/sqlalchemy/ext/declarative.py
lib/sqlalchemy/ext/mutable.py
lib/sqlalchemy/ext/sqlsoup.py
lib/sqlalchemy/orm/__init__.py
lib/sqlalchemy/orm/deprecated_interfaces.py
lib/sqlalchemy/orm/events.py
lib/sqlalchemy/orm/exc.py
lib/sqlalchemy/orm/mapper.py
lib/sqlalchemy/orm/query.py
lib/sqlalchemy/orm/session.py
lib/sqlalchemy/orm/util.py
lib/sqlalchemy/pool.py
lib/sqlalchemy/schema.py
lib/sqlalchemy/sql/expression.py
lib/sqlalchemy/types.py

index cadd6ab241b1bc3abe561593646db3301ea276ba..81b14b1ba8e2c8ad312393c0001b038ffa38f02c 100644 (file)
@@ -12,9 +12,10 @@ Then, a second class-level method ``prepare()`` is used to iterate
 through all mapping configurations collected, reflect the tables
 named within and generate the actual mappers.
 
-The example is new in 0.7.5 and makes usage of the new
-``autoload_replace`` flag on :class:`.Table` to allow declared
-classes to override reflected columns.
+.. versionadded:: 0.7.5
+    This new example makes usage of the new
+    ``autoload_replace`` flag on :class:`.Table` to allow declared
+    classes to override reflected columns.
 
 Usage example::
 
index 3366d5fab78bb0f3030b1b57db070aa0b1ddcb05..25b3695bfccfbbfc5f29ac6ffa62818815e0d2c6 100644 (file)
@@ -161,11 +161,12 @@ http://msdn.microsoft.com/en-us/library/ms175095.aspx.
 Scalar Select Comparisons
 -------------------------
 
-The MSSQL dialect contains a legacy behavior whereby comparing
-a scalar select to a value using the ``=`` or ``!=`` operator
-will resolve to IN or NOT IN, respectively.  This behavior is 
-deprecated and will be removed in 0.8 - the ``s.in_()``/``~s.in_()`` operators 
-should be used when IN/NOT IN are desired.
+.. deprecated:: 0.8
+    The MSSQL dialect contains a legacy behavior whereby comparing
+    a scalar select to a value using the ``=`` or ``!=`` operator
+    will resolve to IN or NOT IN, respectively.  This behavior
+    will be removed in 0.8 - the ``s.in_()``/``~s.in_()`` operators 
+    should be used when IN/NOT IN are desired.
 
 For the time being, the existing behavior prevents a comparison
 between scalar select and another value that actually wants to use ``=``.
index a7cb42aac29489d179b91adb41a9986c16470188..17dcbfecd784428538507bdbf5b39265c373c0e3 100644 (file)
@@ -104,7 +104,10 @@ best guess as to whether or not the driver deals with unicode literals
 well.  When ``False``, unicode literals will be encoded first, and when
 ``True`` unicode literals will be passed straight through.  This is an interim
 flag that hopefully should not be needed when the unicode situation stabilizes
-for unix + PyODBC.  New in 0.7.7.
+for unix + PyODBC.
+
+.. versionadded:: 0.7.7
+    ``supports_unicode_binds`` parameter to ``create_engine()``\ .
 
 """
 
index d28e934a3c61b25d4a742561356692d410fd40dd..88bafd9dd2e3db055f688c133c1283ae70689ebd 100644 (file)
@@ -99,7 +99,7 @@ every new connection. Valid values for this parameter are
                     isolation_level="READ UNCOMMITTED"
                 )
 
-(new in 0.7.6)
+.. versionadded:: 0.7.6
 
 Keys
 ----
index dd761ae823e534c8460333f4e7d72d5e2739ba41..8e7bfe75810208f7d41f4915e1d28143a6b4e6d5 100644 (file)
@@ -63,10 +63,12 @@ used on the SQLAlchemy side.
 Unicode
 -------
 
-SQLAlchemy 0.6 uses the "native unicode" mode provided as of cx_oracle 5.  cx_oracle 5.0.2
-or greater is recommended for support of NCLOB.   If not using cx_oracle 5, the NLS_LANG
-environment variable needs to be set in order for the oracle client library to use 
-proper encoding, such as "AMERICAN_AMERICA.UTF8".
+.. versionchanged:: 0.6
+    SQLAlchemy uses the "native unicode" mode provided as of cx_oracle 5.
+    cx_oracle 5.0.2 or greater is recommended for support of NCLOB.
+    If not using cx_oracle 5, the NLS_LANG environment variable needs
+    to be set in order for the oracle client library to use proper encoding,
+    such as "AMERICAN_AMERICA.UTF8".
 
 Also note that Oracle supports unicode data through the NVARCHAR and NCLOB data types.
 When using the SQLAlchemy Unicode and UnicodeText types, these DDL types will be used
index 5001acca34886e15a19f131c953bdb70532d5dd4..828ea87fcf84a8f03918c1fceaf240f93eaa0eb9 100644 (file)
@@ -98,7 +98,8 @@ to :func:`.create_engine`::
     engine = create_engine("oracle+cx_oracle://dsn", 
                         coerce_to_decimal=False)
 
-The ``coerce_to_decimal`` flag is new in 0.7.6.
+.. versionadded:: 0.7.6
+    Add the ``coerce_to_decimal`` flag.
 
 Another alternative to performance is to use the 
 `cdecimal <http://pypi.python.org/pypi/cdecimal/>`_ library; 
@@ -128,10 +129,13 @@ environment variable. Upon first connection, the dialect runs a
 test to determine the current "decimal" character, which can be
 a comma "," for european locales. From that point forward the
 outputtypehandler uses that character to represent a decimal
-point (this behavior is new in version 0.6.6). Note that
-cx_oracle 5.0.3 or greater is required when dealing with
-numerics with locale settings that don't use a period "." as the
-decimal character.
+point. Note that cx_oracle 5.0.3 or greater is required
+when dealing with numerics with locale settings that don't use
+a period "." as the decimal character.
+
+.. versionchanged:: 0.6.6
+    The outputtypehandler uses a comma "," character to represent
+    a decimal point.
 
 .. _OCI: http://www.oracle.com/technetwork/database/features/oci/index.html
 
index c9cc9261332f30cac7ea198c2f61b3b92001066f..e4bcfa2edecedbc351b5c4cb88198365e9b17024 100644 (file)
@@ -82,9 +82,10 @@ to inspect the actual value using::
 
     SHOW search_path;
 
-Prior to version 0.7.3, cross-schema foreign keys when the schemas
-were also in the ``search_path`` could make an incorrect assumption
-if the schemas were explicitly stated on each :class:`.Table`.
+.. versionchanged:: 0.7.3
+    Prior to this version, cross-schema foreign keys when the schemas
+    were also in the ``search_path`` could make an incorrect assumption
+    if the schemas were explicitly stated on each :class:`.Table`.
 
 Background on PG's ``search_path`` is at: 
 http://www.postgresql.org/docs/9.0/static/ddl-schemas.html#DDL-SCHEMAS-PATH
@@ -137,7 +138,7 @@ Operator Classes
 PostgreSQL allows the specification of an *operator class* for each column of
 an index (see http://www.postgresql.org/docs/8.3/interactive/indexes-opclass.html).
 The :class:`.Index` construct allows these to be specified via the ``postgresql_ops``
-keyword argument (new as of SQLAlchemy 0.7.2)::
+keyword argument::
 
     Index('my_index', my_table.c.id, my_table.c.data, 
                             postgresql_ops={
@@ -145,6 +146,9 @@ keyword argument (new as of SQLAlchemy 0.7.2)::
                                 'id': 'int4_ops'
                             }) 
 
+.. versionadded:: 0.7.2
+    ``postgresql_ops`` keyword argument to :class:`.Index` construct.
+
 Note that the keys in the ``postgresql_ops`` dictionary are the "key" name of
 the :class:`.Column`, i.e. the name used to access it from the ``.c`` collection
 of :class:`.Table`, which can be configured to be different than the actual
@@ -348,21 +352,24 @@ class ARRAY(sqltypes.MutableType, sqltypes.Concatenable, sqltypes.TypeEngine):
           class should be considered mutable - this enables 
           "mutable types" mode in the ORM.  Be sure to read the 
           notes for :class:`.MutableType` regarding ORM 
-          performance implications (default changed from ``True`` in 
-          0.7.0).
+          performance implications.
+
+          .. versionchanged:: 0.7.0
+              Default changed from ``True``\ .
 
-          .. note:: 
-          
-             This functionality is now superseded by the
-             ``sqlalchemy.ext.mutable`` extension described in 
-             :ref:`mutable_toplevel`.
+          .. versionchanged:: 0.7
+              This functionality is now superseded by the
+              ``sqlalchemy.ext.mutable`` extension described in 
+              :ref:`mutable_toplevel`.
 
         :param as_tuple=False: Specify whether return results
           should be converted to tuples from lists. DBAPIs such
           as psycopg2 return lists by default. When tuples are
           returned, the results are hashable. This flag can only
           be set to ``True`` when ``mutable`` is set to
-          ``False``. (new in 0.6.5)
+          ``False``.
+
+          .. versionadded:: 0.6.5
 
         """
         if isinstance(item_type, ARRAY):
@@ -489,8 +496,9 @@ class ENUM(sqltypes.Enum):
          the :meth:`~.postgresql.ENUM.create` and
          :meth:`~.postgresql.ENUM.drop` methods can
          be used to emit SQL to a target bind.
-         (new in 0.7.4)
-         
+
+         .. versionadded:: 0.7.4
+
         """
         self.create_type = kw.pop("create_type", True)
         super(ENUM, self).__init__(*enums, **kw)
index 5aa93978bc8fa5f2cf921028f588225646693471..ec8d0f219e8922043a6717e6079523576e020197 100644 (file)
@@ -96,8 +96,9 @@ on all new connections based on the value passed to
     engine = create_engine("postgresql://user:pass@host/dbname", client_encoding='utf8')
 
 This overrides the encoding specified in the Postgresql client configuration.
-The psycopg2-specific ``client_encoding`` parameter to :func:`.create_engine` is new as of 
-SQLAlchemy 0.7.3.
+
+.. versionadded:: 0.7.3
+    The psycopg2-specific ``client_encoding`` parameter to :func:`.create_engine`.
 
 SQLAlchemy can also be instructed to skip the usage of the psycopg2
 ``UNICODE`` extension and to instead utilize it's own unicode encode/decode
index f4c3338da1d4f42e89dc321569d724d14c29363d..71f91aa3644a838dfadcf9f6fad6c3c03ee4dccf 100644 (file)
@@ -118,12 +118,10 @@ SQLAlchemy sets up pooling to work with Pysqlite's default behavior:
   prevents a connection from being used again in a different thread and works
   best with SQLite's coarse-grained file locking.
 
-  .. note:: 
-  
-     The default selection of :class:`.NullPool` for SQLite file-based databases 
-     is new in SQLAlchemy 0.7. Previous versions
-     select :class:`.SingletonThreadPool` by
-     default for all SQLite databases.
+  .. versionchanged:: 0.7
+      Default selection of :class:`.NullPool` for SQLite file-based databases.
+      Previous versions select :class:`.SingletonThreadPool` by
+      default for all SQLite databases.
 
 Modern versions of SQLite no longer have the threading restrictions, and assuming
 the sqlite3/pysqlite library was built with SQLite's default threading mode
index 9e48f64593ff91cdb41c097929bf5798d031d8e6..90fed17078e90712decf42f0e72ed7e42cc3b273 100644 (file)
@@ -310,7 +310,9 @@ def create_engine(*args, **kwargs):
         behavior of the pool, which is whether ``rollback()``, 
         ``commit()``, or nothing is called upon connections
         being returned to the pool.  See the docstring for
-        ``reset_on_return`` at :class:`.Pool`. (new as of 0.7.6)
+        ``reset_on_return`` at :class:`.Pool`.
+
+        .. versionadded:: 0.7.6
 
     :param pool_timeout=30: number of seconds to wait before giving
         up on getting a connection from the pool. This is only used
index 6d18db16c7c94b231aa23a15f3615ea70a1f2aed..11bd1f4b4081b1b485b947117aa09d5930f6d50a 100644 (file)
@@ -995,8 +995,10 @@ class Connection(Connectable):
           containing percent signs (and possibly other characters)
           that is neutral regarding whether it's executed by the DBAPI
           or piped into a script that's later invoked by 
-          command line tools.  New in 0.7.6.
-          
+          command line tools.
+
+          .. versionadded:: 0.7.6
+
         :param stream_results: Available on: Connection, statement.
           Indicate to the dialect that results should be 
           "streamed" and not pre-buffered, if possible.  This is a limitation
@@ -2343,7 +2345,7 @@ class Engine(Connectable, log.Identified):
         close the :class:`.Connection` when that :class:`.ResultProxy`
         has exhausted all result rows.
 
-        New in 0.7.6.
+        .. versionadded:: 0.7.6
         
         See also:
         
index 18888be0395a99ca3848c46b5c34d43a1b5cfc0a..161b651ebc2a8d8d173c0ccb2a8a5db25f391381 100644 (file)
@@ -427,7 +427,7 @@ class ConnectionEvents(event.Events):
         exception is then wrapped in a SQLAlchemy DBAPI exception
         wrapper and re-thrown.
         
-        New in 0.7.7.
+        .. versionadded:: 0.7.7
 
         """
 
index 8b3416ea98c928197f08b39a46bd3b0cb2529eff..7542f892ec26939ddd950d974660cca291c7b345 100644 (file)
@@ -141,7 +141,7 @@ class AssociationProxy(object):
         """The 'remote' :class:`.MapperProperty` referenced by this
         :class:`.AssociationProxy`.
         
-        New in 0.7.3.
+        .. versionadded:: 0.7.3
         
         See also:
         
@@ -157,7 +157,7 @@ class AssociationProxy(object):
         """The 'local' :class:`.MapperProperty` referenced by this
         :class:`.AssociationProxy`.
 
-        New in 0.7.3.
+        .. versionadded:: 0.7.3
         
         See also:
         
@@ -177,7 +177,7 @@ class AssociationProxy(object):
         
             sess.query(Parent).join(*Parent.proxied.attr)
 
-        New in 0.7.3.
+        .. versionadded:: 0.7.3
         
         See also:
         
index ecdae68d6bb720e87f5a78aae94a0ad442ba670e..ac00c8a9c4dc77c7a6b093bcc2723d4444e38e10 100755 (executable)
@@ -506,10 +506,12 @@ before the class is built::
 Using the Concrete Helpers
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-New helper classes released in 0.7.3 provides a simpler pattern for concrete inheritance.
+Helper classes provides a simpler pattern for concrete inheritance.
 With these objects, the ``__declare_last__`` helper is used to configure the "polymorphic"
 loader for the mapper after all subclasses have been declared.
 
+.. versionadded:: 0.7.3
+
 An abstract base can be declared using the :class:`.AbstractConcreteBase` class::
 
     from sqlalchemy.ext.declarative import AbstractConcreteBase
@@ -671,8 +673,7 @@ keys, as a :class:`.ForeignKey` itself contains references to columns
 which can't be properly recreated at this level.  For columns that 
 have foreign keys, as well as for the variety of mapper-level constructs
 that require destination-explicit context, the
-:func:`~.declared_attr` decorator (renamed from ``sqlalchemy.util.classproperty`` in 0.6.5) 
-is provided so that
+:func:`~.declared_attr` decorator is provided so that
 patterns common to many classes can be defined as callables::
 
     from sqlalchemy.ext.declarative import declared_attr
@@ -691,6 +692,9 @@ point at which the ``User`` class is constructed, and the declarative
 extension can use the resulting :class:`.Column` object as returned by
 the method without the need to copy it.
 
+.. versionchanged:: > 0.6.5
+    Rename 0.6.5 ``sqlalchemy.util.classproperty`` into :func:`~.declared_attr`.
+
 Columns generated by :func:`~.declared_attr` can also be
 referenced by ``__mapper_args__`` to a limited degree, currently 
 by ``polymorphic_on`` and ``version_id_col``, by specifying the 
@@ -928,7 +932,7 @@ Special Directives
 ``__declare_last__()``
 ~~~~~~~~~~~~~~~~~~~~~~
 
-The ``__declare_last__()`` hook, introduced in 0.7.3, allows definition of 
+The ``__declare_last__()`` hook allows definition of 
 a class level function that is automatically called by the :meth:`.MapperEvents.after_configured`
 event, which occurs after mappings are assumed to be completed and the 'configure' step
 has finished::
@@ -939,12 +943,14 @@ has finished::
             ""
             # do something with mappings
 
+.. versionadded:: 0.7.3
+
 .. _declarative_abstract:
 
 ``__abstract__``
 ~~~~~~~~~~~~~~~~~~~
 
-``__abstract__`` is introduced in 0.7.3 and causes declarative to skip the production
+``__abstract__`` causes declarative to skip the production
 of a table or mapper for the class entirely.  A class can be added within a hierarchy
 in the same way as mixin (see :ref:`declarative_mixins`), allowing subclasses to extend
 just from the special class::
@@ -982,6 +988,8 @@ The tables themselves can then be created perhaps within distinct databases::
     DefaultBase.metadata.create_all(some_engine)
     OtherBase.metadata_create_all(some_other_engine)
 
+.. versionadded:: 0.7.3
+
 Class Constructor
 =================
 
@@ -1491,11 +1499,10 @@ class declared_attr(property):
     """Mark a class-level method as representing the definition of
     a mapped property or special declarative member name.
 
-    .. note:: 
-    
-       @declared_attr is available as 
-       ``sqlalchemy.util.classproperty`` for SQLAlchemy versions
-       0.6.2, 0.6.3, 0.6.4.
+    .. versionchanged:: 0.6.{2,3,4}
+        ``@declared_attr`` is available as 
+        ``sqlalchemy.util.classproperty`` for SQLAlchemy versions
+        0.6.2, 0.6.3, 0.6.4.
 
     @declared_attr turns the attribute into a scalar-like
     property that can be invoked from the uninstantiated class.
index 5ca9727ecb9ff9edf6b6aa6a8e1c374c55c9a1d1..2280e33f358c68fc35cb3fe66a4b750301251a38 100644 (file)
@@ -217,12 +217,13 @@ be assigned an object value which represents information "composed" from one
 or more columns from the underlying mapped table. The usual example is that of
 a geometric "point", and is introduced in :ref:`mapper_composite`.
 
-As of SQLAlchemy 0.7, the internals of :func:`.orm.composite` have been
-greatly simplified and in-place mutation detection is no longer enabled by
-default; instead, the user-defined value must detect changes on its own and
-propagate them to all owning parents. The :mod:`sqlalchemy.ext.mutable`
-extension provides the helper class :class:`.MutableComposite`, which is a
-slight variant on the :class:`.Mutable` class.
+.. versionchanged:: 0.7
+    The internals of :func:`.orm.composite` have been
+    greatly simplified and in-place mutation detection is no longer enabled by
+    default; instead, the user-defined value must detect changes on its own and
+    propagate them to all owning parents. The :mod:`sqlalchemy.ext.mutable`
+    extension provides the helper class :class:`.MutableComposite`, which is a
+    slight variant on the :class:`.Mutable` class.
 
 As is the case with :class:`.Mutable`, the user-defined composite class
 subclasses :class:`.MutableComposite` as a mixin, and detects and delivers
index 3727f5757151622be91c842042f3ce0963ded222..30f3f15e1d9eb518870cbd7996441a963b3a6405 100644 (file)
@@ -6,17 +6,12 @@
 
 """
 
-.. note:: 
-
-   SQLSoup is now its own project.  Documentation
-   and project status are available at:
-   
-   http://pypi.python.org/pypi/sqlsoup
-
-   http://readthedocs.org/docs/sqlsoup
-   
-   SQLSoup will no longer be included with SQLAlchemy as of 
-   version 0.8.
+.. versionchanged:: 0.8
+    SQLSoup is now its own project.  Documentation
+    and project status are available at:
+    http://pypi.python.org/pypi/sqlsoup and
+    http://readthedocs.org/docs/sqlsoup\ .
+    SQLSoup will no longer be included with SQLAlchemy.
 
 
 Introduction
@@ -642,7 +637,7 @@ class SqlSoup(object):
         This is the "master" method that can be used to create any 
         configuration.
 
-        (new in 0.6.6)
+        .. versionadded:: 0.6.6
 
         :param attrname: String attribute name which will be
           established as an attribute on this :class:.`.SqlSoup`
@@ -723,8 +718,9 @@ class SqlSoup(object):
     def map(self, selectable, base=None, **mapper_args):
         """Map a selectable directly.
 
-        The class and its mapping are not cached and will
-        be discarded once dereferenced (as of 0.6.6).
+        .. versionchanged:: 0.6.6
+            The class and its mapping are not cached and will
+            be discarded once dereferenced.
 
         :param selectable: an :func:`.expression.select` construct.
         :param base: a Python class which will be used as the
@@ -749,8 +745,9 @@ class SqlSoup(object):
         """Map a selectable directly, wrapping the 
         selectable in a subquery with labels.
 
-        The class and its mapping are not cached and will
-        be discarded once dereferenced (as of 0.6.6).
+        .. versionchanged:: 0.6.6
+            The class and its mapping are not cached and will
+            be discarded once dereferenced.
 
         :param selectable: an :func:`.expression.select` construct.
         :param base: a Python class which will be used as the
@@ -773,8 +770,9 @@ class SqlSoup(object):
                 base=None, **mapper_args):
         """Create an :func:`.expression.join` and map to it.
 
-        The class and its mapping are not cached and will
-        be discarded once dereferenced (as of 0.6.6).
+        .. versionchanged:: 0.6.6
+            The class and its mapping are not cached and will
+            be discarded once dereferenced.
 
         :param left: a mapped class or table object.
         :param right: a mapped class or table object.
index 41923c2b1387c080ad9c006345d5a2442174278e..6b151e8b908ca1ab7eede580d238f31a17d4e945 100644 (file)
@@ -180,10 +180,8 @@ def create_session(bind=None, **kwargs):
 def relationship(argument, secondary=None, **kwargs):
     """Provide a relationship of a primary Mapper to a secondary Mapper.
 
-    .. note:: 
-    
-       :func:`relationship` is historically known as
-       :func:`relation` prior to version 0.6.
+    .. versionchanged:: 0.6
+        :func:`relationship` is historically known as :func:`relation`.
 
     This corresponds to a parent-child or associative table relationship.  The
     constructed class is an instance of :class:`.RelationshipProperty`.
@@ -299,11 +297,13 @@ def relationship(argument, secondary=None, **kwargs):
 
       * ``delete-orphan`` - if an item of the child's type is 
         detached from its parent, mark it for deletion.  
-        As of version 0.7, this option does not prevent
-        a new instance of the child object from being persisted
-        without a parent to start with; to constrain against
-        that case, ensure the child's foreign key column(s)
-        is configured as NOT NULL
+
+        .. versionchanged:: 0.7
+            This option does not prevent
+            a new instance of the child object from being persisted
+            without a parent to start with; to constrain against
+            that case, ensure the child's foreign key column(s)
+            is configured as NOT NULL
 
       * ``refresh-expire`` - cascade the :meth:`.Session.expire` 
         and :meth:`~sqlalchemy.orm.session.Session.refresh` operations
@@ -419,7 +419,9 @@ def relationship(argument, secondary=None, **kwargs):
 
       * ``immediate`` - items should be loaded as the parents are loaded,
         using a separate SELECT statement, or identity map fetch for
-        simple many-to-one references.  (new as of 0.6.5)
+        simple many-to-one references.
+
+        .. versionadded:: 0.6.5
 
       * ``joined`` - items should be loaded "eagerly" in the same query as
         that of the parent, using a JOIN or LEFT OUTER JOIN.  Whether
@@ -670,7 +672,9 @@ def column_property(*cols, **kw):
       flag is available for applications that make use of
       :func:`.attributes.get_history` or :meth:`.Session.is_modified`
       which also need to know
-      the "previous" value of the attribute. (new in 0.6.6)
+      the "previous" value of the attribute.
+
+      .. versionadded:: 0.6.6
 
     :param comparator_factory: a class which extends
        :class:`.ColumnProperty.Comparator` which provides custom SQL clause
@@ -702,8 +706,8 @@ def column_property(*cols, **kw):
         Note however that the :class:`.Session` with default expiration
         settings still expires 
         all attributes after a :meth:`.Session.commit` call, however.
-        New in 0.7.3.
-        
+
+        .. versionadded:: 0.7.3
 
     :param extension:
         an
@@ -734,8 +738,10 @@ def composite(class_, *cols, **kwargs):
       When ``True``, indicates that the "previous" value for a
       scalar attribute should be loaded when replaced, if not
       already loaded.  See the same flag on :func:`.column_property`.
-      (This flag becomes meaningful specifically for 
-      :func:`.composite` in 0.7 - previously it was a placeholder).
+
+      .. versionchanged:: 0.7
+          This flag specifically becomes meaningful
+          - previously it was a placeholder.
 
     :param group:
       A group name for this property when marked as deferred.
@@ -975,7 +981,7 @@ def mapper(class_, local_table=None, *args, **params):
                     "polymorphic_identity":"employee"
                 }
         
-          As of SQLAlchemy 0.7.4, it may also be specified
+          It may also be specified
           as a SQL expression, as in this example where we 
           use the :func:`.case` construct to provide a conditional
           approach::
@@ -994,7 +1000,7 @@ def mapper(class_, local_table=None, *args, **params):
                     "polymorphic_identity":"employee"
                 }
         
-          Also as of 0.7.4, it may also refer to any attribute 
+          It may also refer to any attribute 
           configured with :func:`.column_property`, or to the
           string name of one::
             
@@ -1014,7 +1020,12 @@ def mapper(class_, local_table=None, *args, **params):
                         "polymorphic_on":employee_type,
                         "polymorphic_identity":"employee"
                     }
-            
+
+          .. versionchanged:: 0.7.4
+              ``polymorphic_on`` may be specified as a SQL expression,
+              or refer to any attribute configured with
+              :func:`.column_property`, or to the string name of one.
+
           When setting ``polymorphic_on`` to reference an
           attribute or expression that's not present in the
           locally mapped :class:`.Table`, yet the value 
@@ -1121,11 +1132,10 @@ def synonym(name, map_column=False, descriptor=None,
                         comparator_factory=None, doc=None):
     """Denote an attribute name as a synonym to a mapped property.
 
-    .. note:: 
-    
-       :func:`.synonym` is superseded as of 0.7 by 
-       the :mod:`~sqlalchemy.ext.hybrid` extension.  See 
-       the documentation for hybrids at :ref:`hybrids_toplevel`.
+    .. versionchanged:: 0.7
+        :func:`.synonym` is superseded by the :mod:`~sqlalchemy.ext.hybrid`
+        extension.  See  the documentation for hybrids
+        at :ref:`hybrids_toplevel`.
 
     Used with the ``properties`` dictionary sent to
     :func:`~sqlalchemy.orm.mapper`::
@@ -1165,12 +1175,11 @@ def comparable_property(comparator_factory, descriptor=None):
     """Provides a method of applying a :class:`.PropComparator` 
     to any Python descriptor attribute.
 
-    .. note:: 
-    
-       :func:`.comparable_property` is superseded as of 0.7 by 
-       the :mod:`~sqlalchemy.ext.hybrid` extension.  See the example 
-       at :ref:`hybrid_custom_comparators`.
-    
+    .. versionchanged:: 0.7
+        :func:`.comparable_property` is superseded by
+        the :mod:`~sqlalchemy.ext.hybrid` extension.  See the example 
+        at :ref:`hybrid_custom_comparators`.
+
     Allows any Python descriptor to behave like a SQL-enabled 
     attribute when used at the class level in queries, allowing
     redefinition of expression operator behavior.
@@ -1269,12 +1278,11 @@ def joinedload(*keys, **kw):
     """Return a ``MapperOption`` that will convert the property of the given
     name or series of mapped attributes into an joined eager load.
 
-    .. note:: 
-    
-       This function is known as :func:`eagerload` in all versions
-       of SQLAlchemy prior to version 0.6beta3, including the 0.5 and 0.4
-       series. :func:`eagerload` will remain available for the foreseeable
-       future in order to enable cross-compatibility.
+    .. versionchanged:: 0.6beta3
+        This function is known as :func:`eagerload` in all versions
+        of SQLAlchemy prior to version 0.6beta3, including the 0.5 and 0.4
+        series. :func:`eagerload` will remain available for the foreseeable
+        future in order to enable cross-compatibility.
 
     Used with :meth:`~sqlalchemy.orm.query.Query.options`.
 
@@ -1329,12 +1337,11 @@ def joinedload_all(*keys, **kw):
     given dot-separated path or series of mapped attributes 
     into an joined eager load.
 
-    .. note:: 
-    
-       This function is known as :func:`eagerload_all` in all versions
-       of SQLAlchemy prior to version 0.6beta3, including the 0.5 and 0.4
-       series. :func:`eagerload_all` will remain available for the
-       foreseeable future in order to enable cross-compatibility.
+    .. versionchanged:: 0.6beta3
+        This function is known as :func:`eagerload_all` in all versions
+        of SQLAlchemy prior to version 0.6beta3, including the 0.5 and 0.4
+        series. :func:`eagerload_all` will remain available for the
+        foreseeable future in order to enable cross-compatibility.
 
     Used with :meth:`~sqlalchemy.orm.query.Query.options`.
 
@@ -1480,7 +1487,7 @@ def immediateload(*keys):
 
     See also:  :func:`lazyload`, :func:`eagerload`, :func:`subqueryload`
 
-    New as of verison 0.6.5.
+    .. versionadded:: 0.6.5
 
     """
     return strategies.EagerLazyOption(keys, lazy='immediate')
index dfc368f0948992fb7b2ee287cdcd7347fb1281c1..de9c5ef75a818db1924ae1e248a4d576a63849af 100644 (file)
@@ -247,10 +247,11 @@ class MapperExtension(object):
         instance population will not proceed, giving this extension an
         opportunity to populate the instance itself, if desired.
 
-        As of 0.5, most usages of this hook are obsolete.  For a
-        generic "object has been newly created from a row" hook, use
-        ``reconstruct_instance()``, or the ``@orm.reconstructor``
-        decorator.
+        .. deprecated:: 0.5
+            Most usages of this hook are obsolete.  For a
+            generic "object has been newly created from a row" hook, use
+            ``reconstruct_instance()``, or the ``@orm.reconstructor``
+            decorator.
 
         """
         return EXT_CONTINUE
index d319a3bbb7c69806173794a9a563d4125e87e84d..3d1961583a3837e669c596dc33ecae0a7db39c36 100644 (file)
@@ -1007,7 +1007,7 @@ class SessionEvents(event.Events):
          for the given :class:`.Session` is available via the
          :attr:`.Session.transaction` attribute.
 
-        New in 0.7.3.
+        .. versionadded:: 0.7.3
 
         """
 
index 2aaf1490b16a0355857455aac67fc881bf865453..9b3a78c43557a22001128f84ad2a98744b150a80 100644 (file)
@@ -27,12 +27,14 @@ class StaleDataError(sa.exc.SQLAlchemyError):
     * A mapped object with version_id_col was refreshed, 
       and the version number coming back from the database does
       not match that of the object itself.
-      
+
     * A object is detached from its parent object, however
       the object was previously attached to a different parent
       identity which was garbage collected, and a decision
       cannot be made if the new parent was really the most
-      recent "parent" (new in 0.7.4).
+      recent "parent".
+
+      .. versionadded:: 0.7.4
 
     """
 
index afabac05a75708fad7804576ff4033e1f3b84c50..3fe6ae6c0eb7272484dd753d1ac8172e70cd75c6 100644 (file)
@@ -2311,7 +2311,9 @@ def validates(*names, **kw):
     :param \*names: list of attribute names to be validated.
     :param include_removes: if True, "remove" events will be 
      sent as well - the validation function must accept an additional
-     argument "is_remove" which will be a boolean.  New in 0.7.7.
+     argument "is_remove" which will be a boolean.
+
+     .. versionadded:: 0.7.7
 
     """
     include_removes = kw.pop('include_removes', False)
index 79ef423535c853456613f7309c01934751987814..f82fd3edacb1d538ead5c6e21cd02bd08cfbf565 100644 (file)
@@ -455,7 +455,7 @@ class Query(object):
         """Return the full SELECT statement represented by this :class:`.Query`
         represented as a common table expression (CTE).
 
-        The :meth:`.Query.cte` method is new in 0.7.6.
+        .. versionadded:: 0.7.6
         
         Parameters and usage are the same as those of the 
         :meth:`._SelectBase.cte` method; see that method for 
@@ -513,7 +513,7 @@ class Query(object):
 
         Analogous to :meth:`sqlalchemy.sql._SelectBaseMixin.label`.
 
-        New in 0.6.5.
+        .. versionadded:: 0.6.5
 
         """
 
@@ -526,7 +526,7 @@ class Query(object):
 
         Analogous to :meth:`sqlalchemy.sql._SelectBaseMixin.as_scalar`.
 
-        New in 0.6.5.
+        .. versionadded:: 0.6.5
 
         """
 
@@ -981,7 +981,7 @@ class Query(object):
             q = q.join((subq, subq.c.email < Address.email)).\\
                         limit(1)
 
-        New in 0.6.5.
+        .. versionadded:: 0.6.5
 
         """
         self._set_entities(entities)
@@ -1058,7 +1058,7 @@ class Query(object):
         This allows ad-hoc recipes to be created for :class:`.Query`
         objects.  See the example at :ref:`hybrid_transformers`.
 
-        :meth:`~.Query.with_transformation` is new in SQLAlchemy 0.7.4.
+        .. versionadded:: 0.7.4
 
         """
         return fn(self)
@@ -1115,7 +1115,8 @@ class Query(object):
             ``'read_nowait'`` - passes ``for_update='read_nowait'``, which 
             translates to ``FOR SHARE NOWAIT`` (supported by PostgreSQL).
             
-            New in 0.7.7: ``FOR SHARE`` and ``FOR SHARE NOWAIT`` (PostgreSQL)
+            .. versionadded:: 0.7.7
+                ``FOR SHARE`` and ``FOR SHARE NOWAIT`` (PostgreSQL).
         """
 
         self._lockmode = mode
@@ -1149,7 +1150,7 @@ class Query(object):
         
             session.query(MyClass).filter(MyClass.name == 'some name')
         
-        Multiple criteria are joined together by AND (new in 0.7.5)::
+        Multiple criteria are joined together by AND::
         
             session.query(MyClass).\\
                 filter(MyClass.name == 'some name', MyClass.id > 5)
@@ -1158,6 +1159,9 @@ class Query(object):
         WHERE clause of a select.   String expressions are coerced
         into SQL expression constructs via the :func:`.text` construct.
 
+        .. versionchanged:: 0.7.5
+            Multiple criteria joined by AND.
+
         See also:
         
         :meth:`.Query.filter_by` - filter on keyword expressions.
@@ -1481,18 +1485,15 @@ class Query(object):
         
             q = session.query(User).join(Address, User.id==Address.user_id)
         
-        .. note:: 
-        
-           In SQLAlchemy 0.6 and earlier, the two argument form of 
-           :meth:`~.Query.join` requires the usage of a tuple::
-           
-               query(User).join((Address, User.id==Address.user_id))
-           
-           This calling form is accepted in 0.7 and further, though
-           is not necessary unless multiple join conditions are passed to
-           a single :meth:`~.Query.join` call, which itself is also not
-           generally necessary as it is now equivalent to multiple
-           calls (this wasn't always the case).
+        .. versionchanged:: 0.7
+            In SQLAlchemy 0.6 and earlier, the two argument form of 
+            :meth:`~.Query.join` requires the usage of a tuple:
+            ``query(User).join((Address, User.id==Address.user_id))``\ .
+            This calling form is accepted in 0.7 and further, though
+            is not necessary unless multiple join conditions are passed to
+            a single :meth:`~.Query.join` call, which itself is also not
+            generally necessary as it is now equivalent to multiple
+            calls (this wasn't always the case).
            
         **Advanced Join Targeting and Adaption**
 
@@ -2097,7 +2098,7 @@ class Query(object):
             SELECT HIGH_PRIORITY SQL_SMALL_RESULT ALL users.name AS users_name 
             FROM users
         
-        New in 0.7.7.
+        .. versionadded:: 0.7.7
 
         """
         if self._prefixes:
@@ -2173,9 +2174,11 @@ class Query(object):
         unique entity or entities - this is a successful result for one().
 
         Calling ``one()`` results in an execution of the underlying query.
-        As of 0.6, ``one()`` fully fetches all results instead of applying 
-        any kind of limit, so that the "unique"-ing of entities does not 
-        conceal multiple object identities.
+
+        .. versionchanged:: 0.6
+            ``one()`` fully fetches all results instead of applying 
+            any kind of limit, so that the "unique"-ing of entities does not 
+            conceal multiple object identities.
 
         """
         ret = list(self)
@@ -2537,8 +2540,8 @@ class Query(object):
                 SELECT <rest of query follows...>
             ) AS anon_1
 
-        Note the above scheme is newly refined in 0.7 
-        (as of 0.7b3).
+        .. versionchanged:: 0.7
+            The above scheme is newly refined as of 0.7b3.
         
         For fine grained control over specific columns 
         to count, to skip the usage of a subquery or
index 69bc9248eb3805beac7fcb12382172b5b1c7d82e..03af8765382a5a2c753695582567a692b7c1d505 100644 (file)
@@ -109,11 +109,12 @@ class SessionTransaction(object):
     instances behind the scenes, with one :class:`~.engine.base.Transaction`
     per :class:`~.engine.base.Engine` in use.
 
-    Direct usage of :class:`.SessionTransaction` is not typically 
-    necessary as of SQLAlchemy 0.4; use the :meth:`.Session.rollback` and 
-    :meth:`.Session.commit` methods on :class:`.Session` itself to 
-    control the transaction.
-    
+    .. versionchanged:: 0.4
+        Direct usage of :class:`.SessionTransaction` is not typically
+        necessary; use the :meth:`.Session.rollback` and 
+        :meth:`.Session.commit` methods on :class:`.Session` itself to 
+        control the transaction.
+
     The current instance of :class:`.SessionTransaction` for a given
     :class:`.Session` is available via the :attr:`.Session.transaction`
     attribute.
@@ -998,7 +999,7 @@ class Session(object):
         of objects which involve existing database queries,
         where the uncompleted object should not yet be flushed.
         
-        New in 0.7.6.
+        .. versionadded:: 0.7.6
 
         """
         autoflush = self.autoflush
@@ -1689,19 +1690,18 @@ class Session(object):
         E.g.::
         
             return session.is_modified(someobject, passive=True)
-            
-        .. note:: 
-          
-           In SQLAlchemy 0.7 and earlier, the ``passive`` 
-           flag should **always** be explicitly set to ``True``. 
-           The current default value of :data:`.attributes.PASSIVE_OFF`
-           for this flag is incorrect, in that it loads unloaded
-           collections and attributes which by definition 
-           have no modified state, and furthermore trips off 
-           autoflush which then causes all subsequent, possibly
-           modified attributes to lose their modified state.   
-           The default value of the flag will be changed in 0.8.
-           
+
+        .. versionchanged:: 0.8
+            In SQLAlchemy 0.7 and earlier, the ``passive`` 
+            flag should **always** be explicitly set to ``True``. 
+            The current default value of :data:`.attributes.PASSIVE_OFF`
+            for this flag is incorrect, in that it loads unloaded
+            collections and attributes which by definition 
+            have no modified state, and furthermore trips off 
+            autoflush which then causes all subsequent, possibly
+            modified attributes to lose their modified state.   
+            The default value of the flag will be changed in 0.8.
+
         A few caveats to this method apply:
 
         * Instances present in the :attr:`.Session.dirty` collection may report 
@@ -1745,10 +1745,11 @@ class Session(object):
          is a bug, as unloaded attributes by definition have 
          no changes, and the load operation also triggers an
          autoflush which then cancels out subsequent changes.
-         This flag should **always be set to 
-         True**.  In 0.8 the flag will be deprecated and the default
-         set to ``True``.
+         This flag should **always be set to True**.
 
+         .. versionchanged:: 0.8
+             The flag will be deprecated and the default
+             set to ``True``.
 
         """
         try:
index 197c0c4c15925982845415966da5f8099c1278e9..9d81913cb09b99c902960d491124ed60c539390c 100644 (file)
@@ -291,7 +291,7 @@ class AliasedClass(object):
      have any "column correspondence" to the actual ``UnitPrice.price`` column
      as it is not a proxy of the original.
 
-     ``adapt_on_names`` is new in 0.7.3.
+     .. versionadded:: 0.7.3
 
     """
     def __init__(self, cls, alias=None, name=None, adapt_on_names=False):
@@ -520,11 +520,12 @@ def with_parent(instance, prop):
     Python without the need to render joins to the parent table
     in the rendered statement.
 
-    As of 0.6.4, this method accepts parent instances in all 
-    persistence states, including transient, persistent, and detached.
-    Only the requisite primary key/foreign key attributes need to
-    be populated.  Previous versions didn't work with transient
-    instances.
+    .. versionchanged:: 0.6.4
+        This method accepts parent instances in all 
+        persistence states, including transient, persistent, and detached.
+        Only the requisite primary key/foreign key attributes need to
+        be populated.  Previous versions didn't work with transient
+        instances.
 
     :param instance:
       An instance which has some :func:`.relationship`.
index fdb4889201f27b6814794047ed80d837353bc32b..f1c5e6265003f2ea9be8311f8f2eb30f8aace3b8 100644 (file)
@@ -642,9 +642,8 @@ class QueuePool(Pool):
 
         :param reset_on_return: Determine steps to take on 
           connections as they are returned to the pool.   
-          As of SQLAlchemy 0.7.6, reset_on_return can have any 
-          of these values:
-          
+          reset_on_return can have any of these values:
+
           * 'rollback' - call rollback() on the connection,
             to release locks and transaction resources.
             This is the default value.  The vast majority
@@ -659,18 +658,21 @@ class QueuePool(Pool):
             value is more dangerous than 'rollback' because
             any data changes present on the transaction
             are committed unconditionally.
-           * None - don't do anything on the connection.
-             This setting should only be made on a database
-             that has no transaction support at all,
-             namely MySQL MyISAM.   By not doing anything,
-             performance can be improved.   This
-             setting should **never be selected** for a 
-             database that supports transactions,
-             as it will lead to deadlocks and stale
-             state.
-            * False - same as None, this is here for
-              backwards compatibility.
-          
+          * None - don't do anything on the connection.
+            This setting should only be made on a database
+            that has no transaction support at all,
+            namely MySQL MyISAM.   By not doing anything,
+            performance can be improved.   This
+            setting should **never be selected** for a 
+            database that supports transactions,
+            as it will lead to deadlocks and stale
+            state.
+          * False - same as None, this is here for
+            backwards compatibility.
+
+          .. versionchanged:: 0.7.6
+              ``reset_on_return`` accepts values.
+
         :param listeners: A list of
           :class:`~sqlalchemy.interfaces.PoolListener`-like objects or
           dictionaries of callables that receive events when DB-API
@@ -784,9 +786,9 @@ class NullPool(Pool):
     invalidation are not supported by this Pool implementation, since
     no connections are held persistently.
 
-    :class:`.NullPool` is used by the SQlite dialect automatically
-    when a file-based database is used (as of SQLAlchemy 0.7).
-    See :ref:`sqlite_toplevel`.
+    .. versionchanged:: 0.7
+        :class:`.NullPool` is used by the SQlite dialect automatically
+        when a file-based database is used. See :ref:`sqlite_toplevel`.
 
     """
 
@@ -865,10 +867,11 @@ class AssertionPool(Pool):
     This will raise an exception if more than one connection is checked out
     at a time.  Useful for debugging code that is using more connections
     than desired.
-    
-    :class:`.AssertionPool` also logs a traceback of where
-    the original connection was checked out, and reports
-    this in the assertion error raised (new in 0.7).
+
+    .. versionchanged:: 0.7
+        :class:`.AssertionPool` also logs a traceback of where
+        the original connection was checked out, and reports
+        this in the assertion error raised.
 
     """
     def __init__(self, *args, **kw):
index 9746af22872737efbbd8d37a94f67795026b3a67..df55f61255656b130b3e73f8471b4bfe68cc09ce 100644 (file)
@@ -153,7 +153,9 @@ class Table(SchemaItem, expression.TableClause):
         excluded from the reflection process.    Note that this does
         not impact ``Column`` objects specified in the same call to ``Table``
         which includes ``autoload``, those always take precedence.
-        Defaults to ``True``.  New in 0.7.5.
+        Defaults to ``True``.
+
+        .. versionadded:: 0.7.5
 
     :param autoload_with: If autoload==True, this is an optional Engine 
         or Connection instance to be used for the table reflection. If
@@ -167,12 +169,14 @@ class Table(SchemaItem, expression.TableClause):
         raised if additional table modifiers are specified when 
         the given :class:`.Table` is already present in the :class:`.MetaData`.
 
-        As of version 0.7.4, ``extend_existing`` will work in conjunction
-        with ``autoload=True`` to run a new reflection operation against
-        the database; new :class:`.Column` objects will be produced
-        from database metadata to replace those existing with the same
-        name, and additional :class:`.Column` objects not present
-        in the :class:`.Table` will be added.
+        .. versionchanged:: 0.7.4
+            ``extend_existing`` will work in conjunction
+            with ``autoload=True`` to run a new reflection operation against
+            the database; new :class:`.Column` objects will be produced
+            from database metadata to replace those existing with the same
+            name, and additional :class:`.Column` objects not present
+            in the :class:`.Table` will be added.
+
         As is always the case with ``autoload=True``, :class:`.Column`
         objects can be specified in the same :class:`.Table` constructor,
         which will take precedence.  I.e.::
@@ -727,7 +731,9 @@ class Column(SchemaItem, expression.ColumnClause):
           * Part of the primary key
 
           * Are not referenced by any foreign keys, unless
-            the value is specified as ``'ignore_fk'`` (new in 0.7.4)
+            the value is specified as ``'ignore_fk'``
+
+            .. versionadded:: 0.7.4
 
           * have no server side or client side defaults (with the exception
             of Postgresql SERIAL).
@@ -752,11 +758,12 @@ class Column(SchemaItem, expression.ColumnClause):
             to generate primary key identifiers (i.e. Firebird, Postgresql, 
             Oracle).
 
-          As of 0.7.4, ``autoincrement`` accepts a special value ``'ignore_fk'``
-          to indicate that autoincrementing status regardless of foreign key
-          references.  This applies to certain composite foreign key
-          setups, such as the one demonstrated in the ORM documentation
-          at :ref:`post_update`.
+          .. versionchanged:: 0.7.4
+              ``autoincrement`` accepts a special value ``'ignore_fk'``
+              to indicate that autoincrementing status regardless of foreign key
+              references.  This applies to certain composite foreign key
+              setups, such as the one demonstrated in the ORM documentation
+              at :ref:`post_update`.
 
         :param default: A scalar, Python callable, or
             :class:`~sqlalchemy.sql.expression.ClauseElement` representing the
@@ -1199,9 +1206,9 @@ class ForeignKey(SchemaItem):
             (defaults to the column name itself), unless ``link_to_name`` is
             ``True`` in which case the rendered name of the column is used.
 
-            Note that if the schema name is not included, and the underlying
-            :class:`.MetaData` has a "schema", that value will be used.
-            (new in 0.7.4)
+            .. versionadded:: 0.7.4
+                Note that if the schema name is not included, and the underlying
+                :class:`.MetaData` has a "schema", that value will be used.
 
         :param name: Optional string. An in-database name for the key if
             `constraint` is not provided.
@@ -1635,10 +1642,13 @@ class Sequence(DefaultGenerator):
          that is associated with a :class:`.MetaData` gains access to the 
          ``bind`` of that :class:`.MetaData`, meaning the :meth:`.Sequence.create`
          and :meth:`.Sequence.drop` methods will make usage of that engine
-         automatically.   Additionally, the appropriate CREATE SEQUENCE/
-         DROP SEQUENCE DDL commands will be emitted corresponding to this
-         :class:`.Sequence` when :meth:`.MetaData.create_all` and 
-         :meth:`.MetaData.drop_all` are invoked (new in 0.7).
+         automatically.
+
+         .. versionchanged:: 0.7
+             Additionally, the appropriate CREATE SEQUENCE/
+             DROP SEQUENCE DDL commands will be emitted corresponding to this
+             :class:`.Sequence` when :meth:`.MetaData.create_all` and 
+             :meth:`.MetaData.drop_all` are invoked.
 
          Note that when a :class:`.Sequence` is applied to a :class:`.Column`, 
          the :class:`.Sequence` is automatically associated with the 
@@ -1802,7 +1812,8 @@ class DefaultClause(FetchedValue):
 class PassiveDefault(DefaultClause):
     """A DDL-specified DEFAULT column value.
 
-    .. deprecated:: 0.6 :class:`.PassiveDefault` is deprecated. 
+    .. deprecated:: 0.6
+        :class:`.PassiveDefault` is deprecated. 
         Use :class:`.DefaultClause`.
     """
     @util.deprecated("0.6", 
@@ -2328,12 +2339,14 @@ class MetaData(SchemaItem):
         :param schema:
            The default schema to use for the :class:`.Table`, :class:`.Sequence`, and other
            objects associated with this :class:`.MetaData`.
-           Defaults to ``None``.  New in 0.7.4.
+           Defaults to ``None``.
+
         :param quote_schema:
             Sets the ``quote_schema`` flag for those :class:`.Table`, :class:`.Sequence`,
             and other objects which make usage of the local ``schema`` name.
-            New in 0.7.4.
+
+        .. versionadded:: 0.7.4
+            ``schema`` and ``quote_schema`` parameters.
 
         """
         self.tables = util.immutabledict()
@@ -3055,7 +3068,7 @@ class _CreateDropBase(DDLElement):
 class CreateSchema(_CreateDropBase):
     """Represent a CREATE SCHEMA statement.
 
-    New in 0.7.4.
+    .. versionadded:: 0.7.4
 
     The argument here is the string name of the schema.
 
@@ -3074,7 +3087,8 @@ class DropSchema(_CreateDropBase):
 
     The argument here is the string name of the schema.
 
-    New in 0.7.4.
+    .. versionadded:: 0.7.4
+
     """
 
     __visit_name__ = "drop_schema"
index f9a3863da8145fc50503a40113dde26831c6b627..fbead90b3f585c9ed86eb110b34f0dc903a24517 100644 (file)
@@ -254,8 +254,9 @@ def select(columns=None, whereclause=None, from_obj=[], **kwargs):
       * With the Oracle and Postgresql dialects, the value ``"nowait"``
         translates to ``FOR UPDATE NOWAIT``.
       * With the Postgresql dialect, the values "read" and ``"read_nowait"``
-        translate to ``FOR SHARE`` and ``FOR SHARE NOWAIT``, respectively
-        (new in 0.7.7).
+        translate to ``FOR SHARE`` and ``FOR SHARE NOWAIT``, respectively.
+
+        .. versionadded:: 0.7.7
 
     :param group_by:
       a list of :class:`.ClauseElement` objects which will comprise the
@@ -395,7 +396,7 @@ def update(table, whereclause=None, values=None, inline=False, **kwargs):
      may prefer to use the generative :meth:`~Update.where()` 
      method to specify the ``WHERE`` clause.
      
-     The WHERE clause can refer to multiple tables as of version 0.7.4.
+     The WHERE clause can refer to multiple tables.
      For databases which support this, an ``UPDATE FROM`` clause will
      be generated, or on MySQL, a multi-table update.  The statement 
      will fail on databases that don't have support for multi-table
@@ -409,6 +410,9 @@ def update(table, whereclause=None, values=None, inline=False, **kwargs):
                             as_scalar()
                 )
 
+     .. versionchanged:: 0.7.4
+         The WHERE clause can refer to multiple tables.
+
     :param values:
       Optional dictionary which specifies the ``SET`` conditions of the
       ``UPDATE``.  If left as ``None``, the ``SET``
@@ -1168,7 +1172,7 @@ def over(func, partition_by=None, order_by=None):
     This function is also available from the :attr:`~.expression.func`
     construct itself via the :meth:`.FunctionElement.over` method.
 
-    New in 0.7.
+    .. versionadded:: 0.7
 
     """
     return _Over(func, partition_by=partition_by, order_by=order_by)
@@ -3189,7 +3193,7 @@ class FunctionElement(Executable, ColumnElement, FromClause):
 
         See :func:`~.expression.over` for a full description.
 
-        New in 0.7.
+        .. versionadded:: 0.7
 
         """
         return over(self, partition_by=partition_by, order_by=order_by)
@@ -3733,7 +3737,7 @@ class CTE(Alias):
     :meth:`._SelectBase.cte` method from any selectable.
     See that method for complete examples.
     
-    New in 0.7.6.
+    .. versionadded:: 0.7.6
 
     """
     __visit_name__ = 'cte'
@@ -4352,8 +4356,8 @@ class _SelectBase(Executable, FromClause):
         to be delivered to the FROM clause of the statement as well
         as to a WITH clause at the top of the statement.
 
-        The :meth:`._SelectBase.cte` method is new in 0.7.6.
-        
+        .. versionadded:: 0.7.6
+
         :param name: name given to the common table expression.  Like
          :meth:`._FromClause.alias`, the name can be left as ``None``
          in which case an anonymous symbol will be used at query
@@ -4975,26 +4979,25 @@ class Select(_SelectBase):
         """Return a new :func:`.select` construct with its columns 
         clause replaced with the given columns.
         
-        .. note:: 
-        
-           Due to a bug fix, this method has a slight 
-           behavioral change as of version 0.7.3.  
-           Prior to version 0.7.3, the FROM clause of 
-           a :func:`.select` was calculated upfront and as new columns
-           were added; in 0.7.3 and later it's calculated 
-           at compile time, fixing an issue regarding late binding
-           of columns to parent tables.  This changes the behavior of 
-           :meth:`.Select.with_only_columns` in that FROM clauses no
-           longer represented in the new list are dropped, 
-           but this behavior is more consistent in 
-           that the FROM clauses are consistently derived from the
-           current columns clause.  The original intent of this method
-           is to allow trimming of the existing columns list to be fewer
-           columns than originally present; the use case of replacing
-           the columns list with an entirely different one hadn't
-           been anticipated until 0.7.3 was released; the usage
-           guidelines below illustrate how this should be done.
-           
+        .. versionchanged:: 0.7.3
+            Due to a bug fix, this method has a slight 
+            behavioral change as of version 0.7.3.  
+            Prior to version 0.7.3, the FROM clause of 
+            a :func:`.select` was calculated upfront and as new columns
+            were added; in 0.7.3 and later it's calculated 
+            at compile time, fixing an issue regarding late binding
+            of columns to parent tables.  This changes the behavior of 
+            :meth:`.Select.with_only_columns` in that FROM clauses no
+            longer represented in the new list are dropped, 
+            but this behavior is more consistent in 
+            that the FROM clauses are consistently derived from the
+            current columns clause.  The original intent of this method
+            is to allow trimming of the existing columns list to be fewer
+            columns than originally present; the use case of replacing
+            the columns list with an entirely different one hadn't
+            been anticipated until 0.7.3 was released; the usage
+            guidelines below illustrate how this should be done.
+
         This method is exactly equivalent to as if the original 
         :func:`.select` had been called with the given columns 
         clause.   I.e. a statement::
@@ -5440,7 +5443,7 @@ class UpdateBase(Executable, ClauseElement):
 
             mytable.insert().with_hint("WITH (PAGLOCK)", dialect_name="mssql")
 
-        New in 0.7.6.
+        .. versionadded:: 0.7.6
 
         :param text: Text of the hint.
         :param selectable: optional :class:`.Table` that specifies
index aac86d660030216157710a56f6bd478fd34d1d4b..e5dbe8671b092939990da445ef642442c37f7ad4 100644 (file)
@@ -158,7 +158,7 @@ class TypeEngine(AbstractType):
         :param dialect_name: base name of the dialect which uses 
          this type. (i.e. ``'postgresql'``, ``'mysql'``, etc.)
 
-        New in 0.7.2.
+        .. versionadded:: 0.7.2
 
         """
         return Variant(self, {dialect_name:type_})
@@ -784,7 +784,7 @@ class Variant(TypeDecorator):
     The :class:`.Variant` type is typically constructed
     using the :meth:`.TypeEngine.with_variant` method.
     
-    New in 0.7.2.
+    .. versionadded:: 0.7.2
     
     """
 
@@ -816,8 +816,6 @@ class Variant(TypeDecorator):
         :param dialect_name: base name of the dialect which uses 
          this type. (i.e. ``'postgresql'``, ``'mysql'``, etc.)
 
-        New in 0.7.2.
-        
         """
 
         if dialect_name in self.mapping:
@@ -833,9 +831,8 @@ class MutableType(object):
     a mutable Python object type.   This functionality is used
     only by the ORM.
 
-    .. note:: 
-    
-       :class:`.MutableType` is superseded as of SQLAlchemy 0.7
+    .. versionchanged:: 0.7
+       :class:`.MutableType` is superseded
        by the ``sqlalchemy.ext.mutable`` extension described in
        :ref:`mutable_toplevel`.   This extension provides an event
        driven approach to in-place mutation detection that does not
@@ -880,11 +877,12 @@ class MutableType(object):
         the 6000 objects that have mutable attributes, possibly resulting
         in tens of thousands of additional method calls for every query.
 
-        As of SQLAlchemy 0.7, the ``sqlalchemy.ext.mutable`` is provided which
-        allows an event driven approach to in-place mutation detection. This
-        approach should now be favored over the usage of :class:`.MutableType`
-        with ``mutable=True``. ``sqlalchemy.ext.mutable`` is described in
-        :ref:`mutable_toplevel`.
+        .. versionchanged:: 0.7
+            As of SQLAlchemy 0.7, the ``sqlalchemy.ext.mutable`` is provided
+            which allows an event driven approach to in-place
+            mutation detection. This approach should now be favored over
+            the usage of :class:`.MutableType` with ``mutable=True``.
+            ``sqlalchemy.ext.mutable`` is described in :ref:`mutable_toplevel`.
 
     """
 
@@ -1990,8 +1988,10 @@ class PickleType(MutableType, TypeDecorator):
           using the Python "equals" operator, unless the 
           ``comparator`` argument is present.   See
           :class:`.MutableType` for details on "mutable" type
-          behavior. (default changed from ``True`` in 
-          0.7.0).
+          behavior.
+
+          .. versionchanged:: 0.7.0
+              Default changed from ``True``.
 
           .. note::