]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- corrections
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 27 Dec 2014 20:55:30 +0000 (15:55 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 27 Dec 2014 21:22:41 +0000 (16:22 -0500)
- attempt to add a script to semi-automate the fixing of links

27 files changed:
doc/build/changelog/changelog_09.rst
doc/build/changelog/changelog_10.rst
doc/build/changelog/migration_10.rst
doc/build/conf.py
doc/build/core/compiler.rst
doc/build/core/custom_types.rst
doc/build/core/exceptions.rst
doc/build/core/sqla_engine_arch.png
doc/build/core/types.rst
doc/build/corrections.py [new file with mode: 0644]
doc/build/dialects/sqlite.rst
doc/build/orm/collections.rst
doc/build/orm/constructors.rst
doc/build/orm/exceptions.rst
doc/build/orm/extensions/associationproxy.rst
doc/build/orm/extensions/mutable.rst
doc/build/orm/internals.rst
doc/build/orm/join_conditions.rst
doc/build/orm/mapper_config.rst
doc/build/orm/session_api.rst
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/dialects/postgresql/psycopg2.py
lib/sqlalchemy/orm/session.py
lib/sqlalchemy/pool.py
lib/sqlalchemy/sql/expression.py
lib/sqlalchemy/sql/schema.py
lib/sqlalchemy/sql/sqltypes.py

index 7505ee50c25010da09077089713f769a0785e3a9..e0f46eb66fb05662912679597fcb7392a335ea01 100644 (file)
@@ -1,3 +1,4 @@
+
 ==============
 0.9 Changelog
 ==============
         :versions: 1.0.0
         :pullrequest: bitbucket:28
 
-        Fixed bug where :ref:`ext.mutable.MutableDict`
+        Fixed bug where :class:`.ext.mutable.MutableDict`
         failed to implement the ``update()`` dictionary method, thus
         not catching changes. Pull request courtesy Matt Chisholm.
 
         :versions: 1.0.0
         :pullrequest: bitbucket:27
 
-        Fixed bug where a custom subclass of :ref:`ext.mutable.MutableDict`
+        Fixed bug where a custom subclass of :class:`.ext.mutable.MutableDict`
         would not show up in a "coerce" operation, and would instead
-        return a plain :ref:`ext.mutable.MutableDict`.  Pull request
+        return a plain :class:`.ext.mutable.MutableDict`.  Pull request
         courtesy Matt Chisholm.
 
     .. change::
         :tickets: 3078
 
         Added kw argument ``postgresql_regconfig`` to the
-        :meth:`.Operators.match` operator, allows the "reg config" argument
+        :meth:`.ColumnOperators.match` operator, allows the "reg config" argument
         to be specified to the ``to_tsquery()`` function emitted.
         Pull request courtesy Jonathan Vanasco.
 
         translated through some kind of SQL function or expression.  This
         is kind of experimental, but the first proof of concept is a
         "materialized path" join condition where a path string is compared
-        to itself using "like".   The :meth:`.Operators.like` operator has
+        to itself using "like".   The :meth:`.ColumnOperators.like` operator has
         also been added to the list of valid operators to use in a primaryjoin
         condition.
 
         Fixed an issue where the C extensions in Py3K are using the wrong API
         to specify the top-level module function, which breaks
         in Python 3.4b2.  Py3.4b2 changes PyMODINIT_FUNC to return
-        "void" instead of "PyObject *", so we now make sure to use
-        "PyMODINIT_FUNC" instead of "PyObject *" directly.  Pull request
+        "void" instead of ``PyObject *``, so we now make sure to use
+        "PyMODINIT_FUNC" instead of ``PyObject *`` directly.  Pull request
         courtesy cgohlke.
 
     .. change::
index efd9d51d6aa2f82bb0e515b46ecd4987d6788d89..ceed4d912e1035f4f0e6ae86e753da9fa494ebdb 100644 (file)
         :tags: bug, mysql
         :tickets: 3263
 
-        The :meth:`.Operators.match` operator is now handled such that the
+        The :meth:`.ColumnOperators.match` operator is now handled such that the
         return type is not strictly assumed to be boolean; it now
         returns a :class:`.Boolean` subclass called :class:`.MatchType`.
         The type will still produce boolean behavior when used in Python
     .. change::
         :tags: bug, orm, py3k
 
-        The :class:`.IdentityMap` exposed from :class:`.Session.identity`
+        The :class:`.IdentityMap` exposed from :class:`.Session.identity_map`
         now returns lists for ``items()`` and ``values()`` in Py3K.
         Early porting to Py3K here had these returning iterators, when
         they technically should be "iterable views"..for now, lists are OK.
         :tags: orm, feature
         :tickets: 2971
 
-        The :meth:`.InspectionAttr.info` collection is now moved down to
+        The :attr:`.InspectionAttr.info` collection is now moved down to
         :class:`.InspectionAttr`, where in addition to being available
         on all :class:`.MapperProperty` objects, it is also now available
         on hybrid properties, association proxies, when accessed via
index 717f31aff03a9e7d07e8f5ece49217bbeeed0d16..829d04c512f2a535de7d33af8ea1c7b020fbd415 100644 (file)
@@ -905,7 +905,7 @@ as all the subclasses normally refer to the same table::
 
 
 
-.. _migration_migration_deprecated_orm_events:
+.. _migration_deprecated_orm_events:
 
 Deprecated ORM Event Hooks Removed
 ----------------------------------
@@ -1624,7 +1624,7 @@ again works on MySQL.
 The match() operator now returns an agnostic MatchType compatible with MySQL's floating point return value
 ----------------------------------------------------------------------------------------------------------
 
-The return type of a :meth:`.Operators.match` expression is now a new type
+The return type of a :meth:`.ColumnOperators.match` expression is now a new type
 called :class:`.MatchType`.  This is a subclass of :class:`.Boolean`,
 that can be intercepted by the dialect in order to produce a different
 result type at SQL execution time.
@@ -1669,8 +1669,6 @@ on polishing it.
 Dialect Improvements and Changes - SQLite
 =============================================
 
-.. _change_2984:
-
 SQLite named and unnamed UNIQUE and FOREIGN KEY constraints will inspect and reflect
 -------------------------------------------------------------------------------------
 
index 7e17fcd59da53be4c4b097a9840344ca5ff9dbd4..02784bdae50e3308472b0d4e72c0fbadab72827c 100644 (file)
@@ -37,6 +37,7 @@ extensions = [
                 'zzzeeksphinx',
                 'changelog',
                 'sphinx_paramlinks',
+                'corrections'
             ]
 
 # Add any paths that contain templates here, relative to this directory.
@@ -341,3 +342,5 @@ intersphinx_mapping = {
     'alembic': ('http://alembic.readthedocs.org/en/latest/', None),
     'psycopg2': ('http://pythonhosted.org/psycopg2', None),
 }
+
+
index 73c9e3995105fa18009b434d1f98c0c5ca0b99f2..202ef2b0ec097f5c47d386532b32f809f39170ef 100644 (file)
@@ -4,4 +4,4 @@ Custom SQL Constructs and Compilation Extension
 ===============================================
 
 .. automodule:: sqlalchemy.ext.compiler
-    :members:
\ No newline at end of file
+    :members:
index 92c5ca6cfe7896062f1b44e228b64f5dae90466a..8d0c42703bc1074ac1ac9275c20dff38b281cc14 100644 (file)
@@ -1,3 +1,5 @@
+.. module:: sqlalchemy.types
+
 .. _types_custom:
 
 Custom Types
index 30270f8b02385c2a12429010c5ee000a00762eb7..63bbc1e1546a213e86278109728d6d83bf639806 100644 (file)
@@ -2,4 +2,4 @@ Core Exceptions
 ===============
 
 .. automodule:: sqlalchemy.exc
-    :members:
\ No newline at end of file
+    :members:
index f54d105bd708f1705e75b5f17e9e75af28229833..f040a2cf317c0118bc9d5b12c458224dea4eb690 100644 (file)
Binary files a/doc/build/core/sqla_engine_arch.png and b/doc/build/core/sqla_engine_arch.png differ
index 9d2b66124625a903037404bb0dcf4aafebc0cd1e..ab761a1cb0999f384144a7d290fc71a956b53d19 100644 (file)
@@ -8,4 +8,4 @@ Column and Data Types
 
     type_basics
     custom_types
-    type_api
\ No newline at end of file
+    type_api
diff --git a/doc/build/corrections.py b/doc/build/corrections.py
new file mode 100644 (file)
index 0000000..fa2e13a
--- /dev/null
@@ -0,0 +1,39 @@
+targets = {}
+quit = False
+def missing_reference(app, env, node, contnode):
+    global quit
+    if quit:
+        return
+    reftarget = node.attributes['reftarget']
+    reftype = node.attributes['reftype']
+    refdoc = node.attributes['refdoc']
+    rawsource = node.rawsource
+    if reftype == 'paramref':
+        return
+
+    target = rawsource
+    if target in targets:
+        return
+    print "\n%s" % refdoc
+    print "Reftarget: %s" % rawsource
+    correction = raw_input("? ")
+    correction = correction.strip()
+    if correction == ".":
+        correction = ":%s:`.%s`" % (reftype, reftarget)
+    elif correction == 'q':
+        quit = True
+    else:
+        targets[target] = correction
+
+def write_corrections(app, exception):
+    print "#!/bin/sh\n\n"
+    for targ, corr in targets.items():
+        if not corr:
+            continue
+
+        print """find lib/ -print -type f -name "*.py" -exec sed -i '' 's/%s/%s/g' {} \;""" % (targ, corr)
+        print """find doc/build/ -print -type f -name "*.rst" -exec sed -i '' 's/%s/%s/g' {} \;""" % (targ, corr)
+
+def setup(app):
+    app.connect('missing-reference', missing_reference)
+    app.connect('build-finished', write_corrections)
index a18b0ba7b8aea921baa2a38448524c1f62fc43c1..93a54ee8d7b6e556eed02d4b1cb9a0079dcfe56e 100644 (file)
@@ -33,4 +33,4 @@ Pysqlite
 Pysqlcipher
 -----------
 
-.. automodule:: sqlalchemy.dialects.sqlite.pysqlcipher
\ No newline at end of file
+.. automodule:: sqlalchemy.dialects.sqlite.pysqlcipher
index 898f70ebbc6f968670fc4f27143d3f113b0f7dee..7d474ce65b93841b3c79a8f34309a5f062d83f16 100644 (file)
@@ -573,7 +573,7 @@ Various internal methods.
 
 .. autoclass:: collection
 
-.. autofunction:: collection_adapter
+.. autodata:: collection_adapter
 
 .. autoclass:: CollectionAdapter
 
index ab66915530a08319a50ee992a00e569b4189e086..38cbb41820674d1500992a8213d679cd8fddce0e 100644 (file)
@@ -1,3 +1,5 @@
+.. module:: sqlalchemy.orm
+
 .. _mapping_constructors:
 
 Constructors and Object Initialization
index f95b26eed45f58a9b4f02deb4526879a9fadc08a..047c743e0d9786d67cd010f105a685c75f3344fa 100644 (file)
@@ -2,4 +2,4 @@ ORM Exceptions
 ==============
 
 .. automodule:: sqlalchemy.orm.exc
-    :members:
\ No newline at end of file
+    :members:
index 9b25c4a685eca95134dd21729f2f7cf84976e9ae..6fc57e30cc97fd04f7cc8a4635f444c030e250aa 100644 (file)
@@ -510,4 +510,4 @@ API Documentation
    :members:
    :undoc-members:
 
-.. autodata:: ASSOCIATION_PROXY
\ No newline at end of file
+.. autodata:: ASSOCIATION_PROXY
index 14875cd3ca77f8ad810cc24b9f4c549152c378a3..969411481cc10ed950b23c144be0450cc4fc789c 100644 (file)
@@ -21,7 +21,7 @@ API Reference
 
 .. autoclass:: MutableDict
        :members:
-
+       :undoc-members:
 
 
 
index 78ec2fa8e33d3005fac22337a05c7aa7b9a65a6e..4b68023945b237fd7f857baac0bc0bcd27d88cd1 100644 (file)
@@ -11,6 +11,9 @@ sections, are listed here.
 .. autoclass:: sqlalchemy.orm.state.AttributeState
     :members:
 
+.. autoclass:: sqlalchemy.orm.util.CascadeOptions
+    :members:
+
 .. autoclass:: sqlalchemy.orm.instrumentation.ClassManager
     :members:
     :inherited-members:
@@ -19,6 +22,9 @@ sections, are listed here.
     :members:
     :inherited-members:
 
+.. autoclass:: sqlalchemy.orm.properties.ComparableProperty
+    :members:
+
 .. autoclass:: sqlalchemy.orm.descriptor_props.CompositeProperty
     :members:
 
index 5e2c11d1d90bac3d1237e0c64a362b3a6034e7c6..c39b7312e2707e2a20c5b7a16656bfc9aa14040b 100644 (file)
@@ -462,7 +462,7 @@ we seek for a load of ``Element.descendants`` to look like::
 
 .. versionadded:: 0.9.5 Support has been added to allow a single-column
    comparison to itself within a primaryjoin condition, as well as for
-   primaryjoin conditions that use :meth:`.Operators.like` as the comparison
+   primaryjoin conditions that use :meth:`.ColumnOperators.like` as the comparison
    operator.
 
 .. _self_referential_many_to_many:
index 671abdfd653c4d7f90eb4b37497575c49fe4ad63..9d584cbab64009ba825999a8792a1f76a39d20bd 100644 (file)
@@ -18,4 +18,4 @@ know how to construct and use rudimentary mappers and relationships.
     nonstandard_mappings
     classical
     versioning
-    mapping_api
\ No newline at end of file
+    mapping_api
index 64ac8c08677fd2273f91f822b9fe05751bc454db..3754ac80b8d7d318fc5dd746f9bc3ad03f842e53 100644 (file)
@@ -1,3 +1,5 @@
+.. module:: sqlalchemy.orm.session
+
 Session API
 ============
 
index 034ee90768b913f1cbc223c1051406e0142aa284..d1fcbef3e2e5111bda84f31ba4efefc0e9fd7dd5 100644 (file)
@@ -299,7 +299,7 @@ not re-compute the column on demand.
 
 In order to provide for this explicit query planning, or to use different
 search strategies, the ``match`` method accepts a ``postgresql_regconfig``
-keyword argument.
+keyword argument::
 
     select([mytable.c.id]).where(
         mytable.c.title.match('somestring', postgresql_regconfig='english')
@@ -311,7 +311,7 @@ Emits the equivalent of::
     WHERE mytable.title @@ to_tsquery('english', 'somestring')
 
 One can also specifically pass in a `'regconfig'` value to the
-``to_tsvector()`` command as the initial argument.
+``to_tsvector()`` command as the initial argument::
 
     select([mytable.c.id]).where(
             func.to_tsvector('english', mytable.c.title )\
index f67b2e3b05574b0115fc5bcf6f397e83b3fa5ade..fe27da8b67adcea2e4aedc4eba849bd7d80e4172 100644 (file)
@@ -66,12 +66,13 @@ in ``/tmp``, or whatever socket directory was specified when PostgreSQL
 was built.  This value can be overridden by passing a pathname to psycopg2,
 using ``host`` as an additional keyword argument::
 
-    create_engine("postgresql+psycopg2://user:password@/dbname?host=/var/lib/postgresql")
+    create_engine("postgresql+psycopg2://user:password@/dbname?\
+host=/var/lib/postgresql")
 
 See also:
 
-`PQconnectdbParams <http://www.postgresql.org/docs/9.1/static\
-/libpq-connect.html#LIBPQ-PQCONNECTDBPARAMS>`_
+`PQconnectdbParams <http://www.postgresql.org/docs/9.1/static/\
+libpq-connect.html#LIBPQ-PQCONNECTDBPARAMS>`_
 
 Per-Statement/Connection Execution Options
 -------------------------------------------
@@ -237,7 +238,7 @@ The psycopg2 dialect supports these constants for isolation level:
 * ``AUTOCOMMIT``
 
 .. versionadded:: 0.8.2 support for AUTOCOMMIT isolation level when using
-   psycopg2.
+    psycopg2.
 
 .. seealso::
 
index 507e99b2e2995cbd69bb93d7a024b243e0a2e315..0e272dc95a3ff84cc7e6fb07810ae80b1c00d5d4 100644 (file)
@@ -596,8 +596,8 @@ class Session(_SessionClassMethods):
            .. versionadded:: 0.9.0
 
         :param query_cls:  Class which should be used to create new Query
-        objects, as returned by the :meth:`~.Session.query` method.
-        Defaults to :class:`.Query`.
+          objects, as returned by the :meth:`~.Session.query` method.
+          Defaults to :class:`.Query`.
 
         :param twophase:  When ``True``, all transactions will be started as
             a "two phase" transaction, i.e. using the "two phase" semantics
index a174df784545c2e6de697177cb45a64c9cc1ad5d..a147685d9d8542ac2be7c50c52efad056adbddb9 100644 (file)
@@ -917,9 +917,9 @@ class QueuePool(Pool):
           on returning a connection. Defaults to 30.
 
         :param \**kw: Other keyword arguments including
-        :paramref:`.Pool.recycle`, :paramref:`.Pool.echo`,
-        :paramref:`.Pool.reset_on_return` and others are passed to the
-        :class:`.Pool` constructor.
+          :paramref:`.Pool.recycle`, :paramref:`.Pool.echo`,
+          :paramref:`.Pool.reset_on_return` and others are passed to the
+          :class:`.Pool` constructor.
 
         """
         Pool.__init__(self, creator, **kw)
index 2ffc5468c2a28b0aa9a20c8a2979585c465d8450..2218bd6602650daf6003d2c49a2f1b10eb9e338d 100644 (file)
@@ -47,7 +47,7 @@ from .base import ColumnCollection, Generative, Executable, \
 from .selectable import Alias, Join, Select, Selectable, TableClause, \
     CompoundSelect, CTE, FromClause, FromGrouping, SelectBase, \
     alias, GenerativeSelect, \
-    subquery, HasPrefixes, Exists, ScalarSelect, TextAsFrom
+    subquery, HasPrefixes, HasSuffixes, Exists, ScalarSelect, TextAsFrom
 
 
 from .dml import Insert, Update, Delete, UpdateBase, ValuesBase
index b90f7fc5396e5338c28aff5210ce8fd84a0c7a01..b134b305395ca4b0b0958451779838fd13ca282b 100644 (file)
@@ -2345,6 +2345,14 @@ def _to_schema_column_or_string(element):
 
 
 class ColumnCollectionMixin(object):
+    columns = None
+    """A :class:`.ColumnCollection` of :class:`.Column` objects.
+
+    This collection represents the columns which are referred to by
+    this object.
+
+    """
+
     def __init__(self, *columns):
         self.columns = ColumnCollection()
         self._pending_colargs = [_to_schema_column_or_string(c)
index 9a2de39b4f89f630a23641ce36faada65bb9e742..7bb5c55151f24d199f138fb84e2a81f386dc45a7 100644 (file)
@@ -1657,7 +1657,7 @@ class NullType(TypeEngine):
 class MatchType(Boolean):
     """Refers to the return type of the MATCH operator.
 
-    As the :meth:`.Operators.match` is probably the most open-ended
+    As the :meth:`.ColumnOperators.match` is probably the most open-ended
     operator in generic SQLAlchemy Core, we can't assume the return type
     at SQL evaluation time, as MySQL returns a floating point, not a boolean,
     and other backends might do something different.    So this type