]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fix most sphinx warnings (1.4)
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 16 May 2022 14:57:51 +0000 (10:57 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 16 May 2022 15:21:36 +0000 (11:21 -0400)
still can't figure out the warnings with some of the older
changelog files.

this cherry-picks the sphinx fixes from 1.4 and additionally
fixes a small number of new issues in the 2.0 docs. However,
2.0 has many more errors to fix, primarily from the removal
of the legacy tutorials left behind a lot of labels that need
to be re-linked to the new tutorial.

Fixes: #7946
Change-Id: Id657ab23008eed0b133fed65b2f9ea75a626215c
(cherry picked from commit 9b55a423459236ca8a2ced713c9e93999dd18922)

36 files changed:
doc/build/changelog/changelog_06.rst
doc/build/changelog/changelog_08.rst
doc/build/changelog/changelog_09.rst
doc/build/changelog/changelog_11.rst
doc/build/changelog/changelog_12.rst
doc/build/changelog/changelog_13.rst
doc/build/changelog/changelog_14.rst
doc/build/conf.py
doc/build/core/connections.rst
doc/build/core/constraints.rst
doc/build/core/ddl.rst
doc/build/core/index.rst
doc/build/core/metadata.rst
doc/build/core/reflection.rst
doc/build/dialects/mssql.rst
doc/build/dialects/mysql.rst
doc/build/dialects/postgresql.rst
doc/build/glossary.rst
doc/build/index.rst
doc/build/orm/collections.rst
doc/build/orm/contextual.rst
doc/build/orm/extensions/associationproxy.rst
doc/build/orm/extensions/hybrid.rst
doc/build/orm/internals.rst
doc/build/orm/mapping_styles.rst
doc/build/orm/queryguide.rst
doc/build/tutorial/data_update.rst
doc/build/tutorial/index.rst
lib/sqlalchemy/dialects/postgresql/base.py
lib/sqlalchemy/engine/base.py
lib/sqlalchemy/engine/cursor.py
lib/sqlalchemy/ext/asyncio/session.py
lib/sqlalchemy/schema.py
lib/sqlalchemy/sql/schema.py
lib/sqlalchemy/sql/selectable.py
lib/sqlalchemy/util/langhelpers.py

index cd3b32d95b76117786c36d429ac2b58a06028d32..739df36b230dfa4e3f8701c05e637e1a7f14ac75 100644 (file)
@@ -2,6 +2,7 @@
 0.6 Changelog
 =============
 
+
 .. changelog::
     :version: 0.6.9
     :released: Sat May 05 2012
index f650061003c7ecf3d0b4f2f4cffaae42b6fb1460..decf365593a6b804928bfc49b6a87d1f2ece2b95 100644 (file)
@@ -7,6 +7,7 @@
     .. include:: changelog_07.rst
         :start-line: 5
 
+
 .. changelog::
     :version: 0.8.7
     :released: July 22, 2014
index 7ee874e0261c328b48e8225d532a4b02cfd43146..acf1ede92322c0726533db0ef64e57b9de5c1f35 100644 (file)
     .. change::
         :tags: feature, sql
 
-        Added :paramref:`.MetaData.reflect.**dialect_kwargs`
+        Added :paramref:`.MetaData.reflect.dialect_kwargs`
         to support dialect-level reflection options for all :class:`_schema.Table`
         objects reflected.
 
index 1988b69b307c85a0234e380ed5bd5a9d2bb1f309..c84effc3905bc7d2de41c71ace1354bbcf579f58 100644 (file)
@@ -20,7 +20,6 @@
         :start-line: 5
 
 
-
 .. changelog::
     :version: 1.1.18
     :released: March 6, 2018
         :tickets: 3842
 
         Fixed bug where newly added warning for primary key on insert w/o
-        autoincrement setting (see :ref:`change_3216`) would fail to emit
+        autoincrement setting (see :ticket:`3216`) would fail to emit
         correctly when invoked upon a lower-case :func:`.table` construct.
 
     .. change::  3852
index 6dc7d7f88791c0a16d3e78cbb1523490ac41e63c..b5d331e717b7907e93cd23f175b41d0f5adc5140 100644 (file)
        :tickets: 4352
 
        The column conflict resolution technique discussed at
-       :ref:`declarative_column_conflicts` is now functional for a :class:`_schema.Column`
+       :ref:`orm_inheritance_column_conflicts` is now functional for a :class:`_schema.Column`
        that is also a primary key column.  Previously, a check for primary key
        columns declared on a single-inheritance subclass would occur before the
        column copy were allowed to pass.
index 96002c19ee533f2737d8505c8329e04a657b780d..aba0f4950cab8d7b113f16adce052b6cf0e79410 100644 (file)
         :tags: usecase, postgresql
         :tickets: 5265
 
-        Added support for columns or type :class:`.ARRAY` of :class:`.Enum`,
-        :class:`.JSON` or :class:`_postgresql.JSONB` in PostgreSQL.
+        Added support for columns or type :class:`_sqltypes.ARRAY` of :class:`.Enum`,
+        :class:`_postgresql.JSON` or :class:`_postgresql.JSONB` in PostgreSQL.
         Previously a workaround was required in these use cases.
 
 
         :tickets: 5266
 
         Raise an explicit :class:`.exc.CompileError` when adding a table with a
-        column of type :class:`.ARRAY` of :class:`.Enum` configured with
+        column of type :class:`_sqltypes.ARRAY` of :class:`.Enum` configured with
         :paramref:`.Enum.native_enum` set to ``False`` when
         :paramref:`.Enum.create_constraint` is not set to ``False``
 
 
             :class:`_types.JSON`
 
-            :meth:`.JSON.Comparator.as_string`
+            :meth:`_sqltypes.JSON.Comparator.as_string`
 
-            :meth:`.JSON.Comparator.as_boolean`
+            :meth:`_sqltypes.JSON.Comparator.as_boolean`
 
-            :meth:`.JSON.Comparator.as_float`
+            :meth:`_sqltypes.JSON.Comparator.as_float`
 
-            :meth:`.JSON.Comparator.as_integer`
+            :meth:`_sqltypes.JSON.Comparator.as_integer`
 
     .. change::
         :tags: usecase, oracle
         Added support for the parameters in an ON DUPLICATE KEY UPDATE statement on
         MySQL to be ordered, since parameter order in a MySQL UPDATE clause is
         significant, in a similar manner as that described at
-        :ref:`updates_order_parameters`.  Pull request courtesy Maxim Bublis.
+        :ref:`tutorial_parameter_ordered_updates`.  Pull request courtesy Maxim Bublis.
 
         .. seealso::
 
index e0b4649740ac2ff6f14f34d8b42e667102d1e725..e457a4c46b61e4b06d26118f5015253191568c10 100644 (file)
@@ -34,7 +34,7 @@ This document details individual issue-level changes made throughout
         :tickets: 7936
 
         Fixed regression where the change made for :ticket:`7861`, released in
-        version 1.4.33, that brought the :class:`.Insert` construct to be partially
+        version 1.4.33, that brought the :class:`_sql.Insert` construct to be partially
         recognized as an ORM-enabled statement did not properly transfer the
         correct mapper / mapped table state to the :class:`.Session`, causing the
         :meth:`.Session.get_bind` method to fail for a :class:`.Session` that was
@@ -58,7 +58,7 @@ This document details individual issue-level changes made throughout
         :tags: bug, postgresql
         :tickets: 6515
 
-        Fixed bug in :class:`.ARRAY` datatype in combination with :class:`.Enum` on
+        Fixed bug in :class:`_sqltypes.ARRAY` datatype in combination with :class:`.Enum` on
         PostgreSQL where using the ``.any()`` or ``.all()`` methods to render SQL
         ANY() or ALL(), given members of the Python enumeration as arguments, would
         produce a type adaptation failure on all drivers.
@@ -87,7 +87,7 @@ This document details individual issue-level changes made throughout
         :tickets: 7930
 
         Fixed an issue in the psycopg2 dialect when using the
-        :paramref:`.create_engine.pool_pre_ping` parameter which would cause
+        :paramref:`_sa.create_engine.pool_pre_ping` parameter which would cause
         user-configured ``AUTOCOMMIT`` isolation level to be inadvertently reset by
         the "ping" handler.
 
@@ -105,15 +105,15 @@ This document details individual issue-level changes made throughout
         :tags: bug, engine
         :tickets: 7953
 
-        Added a warning regarding a bug which exists in the :meth:`.Result.columns`
-        method when passing 0 for the index in conjunction with a :class:`.Result`
+        Added a warning regarding a bug which exists in the :meth:`_result.Result.columns`
+        method when passing 0 for the index in conjunction with a :class:`_result.Result`
         that will return a single ORM entity, which indicates that the current
-        behavior of :meth:`.Result.columns` is broken in this case as the
-        :class:`.Result` object will yield scalar values and not :class:`.Row`
+        behavior of :meth:`_result.Result.columns` is broken in this case as the
+        :class:`_result.Result` object will yield scalar values and not :class:`.Row`
         objects. The issue will be fixed in 2.0, which would be a
         backwards-incompatible change for code that relies on the current broken
         behavior. Code which wants to receive a collection of scalar values should
-        use the :meth:`.Result.scalars` method, which will return a new
+        use the :meth:`_result.Result.scalars` method, which will return a new
         :class:`.ScalarResult` object that yields non-row scalar objects.
 
 
@@ -199,7 +199,7 @@ This document details individual issue-level changes made throughout
         :tickets: 7878
 
         Fixed regression caused by :ticket:`7861` where invoking an
-        :class:`.Insert` construct which contained ORM entities directly via
+        :class:`_sql.Insert` construct which contained ORM entities directly via
         :meth:`_orm.Session.execute` would fail.
 
     .. change::
@@ -226,8 +226,8 @@ This document details individual issue-level changes made throughout
         and COMMIT log messages do not actually indicate a real transaction when
         the AUTOCOMMIT isolation level is in use; messaging has been extended to
         include the BEGIN message itself, and the messaging has also been fixed to
-        accommodate when the :class:`.Engine` level
-        :paramref:`.create_engine.isolation_level` parameter was used directly.
+        accommodate when the :class:`_engine.Engine` level
+        :paramref:`_sa.create_engine.isolation_level` parameter was used directly.
 
     .. change::
         :tags: bug, mssql, regression
@@ -314,7 +314,7 @@ This document details individual issue-level changes made throughout
         :tags: usecase, engine
         :tickets: 7877, 7815
 
-        Added new parameter :paramref:`.Engine.dispose.close`, defaulting to True.
+        Added new parameter :paramref:`_engine.Engine.dispose.close`, defaulting to True.
         When False, the engine disposal does not touch the connections in the old
         pool at all, simply dropping the pool and replacing it. This use case is so
         that when the original pool is transferred from a parent process, the
@@ -339,7 +339,7 @@ This document details individual issue-level changes made throughout
 
         Added new attributes :attr:`.UpdateBase.returning_column_descriptions` and
         :attr:`.UpdateBase.entity_description` to allow for inspection of ORM
-        attributes and entities that are installed as part of an :class:`.Insert`,
+        attributes and entities that are installed as part of an :class:`_sql.Insert`,
         :class:`.Update`, or :class:`.Delete` construct. The
         :attr:`.Select.column_descriptions` accessor is also now implemented for
         Core-only selectables.
@@ -1638,15 +1638,15 @@ This document details individual issue-level changes made throughout
         :tags: bug, orm
         :tickets: 7128
 
-        Fixed bug where iterating a :class:`.Result` from a :class:`_orm.Session`
+        Fixed bug where iterating a :class:`_result.Result` from a :class:`_orm.Session`
         after that :class:`_orm.Session` were closed would partially attach objects
         to that session in an essentially invalid state. It now raises an exception
         with a link to new documentation if an **un-buffered** result is iterated
         from a :class:`_orm.Session` that was closed or otherwise had the
-        :meth:`_orm.Session.expunge_all` method called after that :class:`.Result`
+        :meth:`_orm.Session.expunge_all` method called after that :class:`_result.Result`
         was generated. The ``prebuffer_rows`` execution option, as is used
         automatically by the asyncio extension for client-side result sets, may be
-        used to produce a :class:`.Result` where the ORM objects are prebuffered,
+        used to produce a :class:`_result.Result` where the ORM objects are prebuffered,
         and in this case iterating the result will produce a series of detached
         objects.
 
@@ -3484,7 +3484,7 @@ This document details individual issue-level changes made throughout
         :tickets: 6361
 
         Fixed issue where usage of an explicit :class:`.Sequence` would produce
-        inconsistent "inline" behavior for an :class:`.Insert` construct that
+        inconsistent "inline" behavior for an :class:`_sql.Insert` construct that
         includes multiple values phrases; the first seq would be inline but
         subsequent ones would be "pre-execute", leading to inconsistent sequence
         ordering. The sequence expressions are now fully inline.
@@ -4931,7 +4931,7 @@ This document details individual issue-level changes made throughout
         :tags: bug, engine, sqlite
         :tickets: 5845
 
-        Fixed bug in the 2.0 "future" version of :class:`.Engine` where emitting
+        Fixed bug in the 2.0 "future" version of :class:`_engine.Engine` where emitting
         SQL during the :meth:`.EngineEvents.begin` event hook would cause a
         re-entrant (recursive) condition due to autobegin, affecting among other
         things the recipe documented for SQLite to allow for savepoints and
index 037c93bb71891189857bde7ca473d793b9de4924..46fd6147f035c2f80714bca788eb1351cc081429 100644 (file)
@@ -109,7 +109,7 @@ changelog_render_pullreq = {
 
 changelog_render_changeset = "https://www.sqlalchemy.org/trac/changeset/%s"
 
-exclude_patterns = ["build", "**/unreleased*/*", "*_include.rst"]
+exclude_patterns = ["build", "**/unreleased*/*", "**/*_include.rst"]
 
 autodoc_class_signature = "separated"
 autodoc_typehints_format = "short"
index a3d85896d9efb0a76b0379e1d1f850eb360ab142..123c9b6a1e014cbed88d8c78ade3212bbda7d943 100644 (file)
@@ -1981,11 +1981,12 @@ Connection / Engine API
 Result Set  API
 =================
 
-.. autoclass:: BaseCursorResult
+.. autoclass:: ChunkedIteratorResult
     :members:
 
-.. autoclass:: ChunkedIteratorResult
+.. autoclass:: CursorResult
     :members:
+    :inherited-members:
 
 .. autoclass:: FrozenResult
     :members:
@@ -1999,22 +2000,14 @@ Result Set  API
 .. autoclass:: Result
     :members:
     :inherited-members:
-    :exclude-members: memoized_attribute, memoized_instancemethod
 
 .. autoclass:: ScalarResult
     :members:
     :inherited-members:
-    :exclude-members: memoized_attribute, memoized_instancemethod
 
 .. autoclass:: MappingResult
     :members:
     :inherited-members:
-    :exclude-members: memoized_attribute, memoized_instancemethod
-
-.. autoclass:: CursorResult
-    :members:
-    :inherited-members:
-    :exclude-members: memoized_attribute, memoized_instancemethod
 
 .. autoclass:: Row
     :members:
index 97a043aabc34635d0ebeca5b5228588da517a8db..6815da4dc1f38cdf98fb834ac5a9ed0b80b603a8 100644 (file)
@@ -768,6 +768,7 @@ The above schema will produce::
 
 Constraints API
 ---------------
+
 .. autoclass:: Constraint
     :members:
     :inherited-members:
index c34a4e1a330851f5759f36c8c3223b9df3db5c09..bccfb76ccfc30a923462e63b025c33473409095b 100644 (file)
@@ -320,8 +320,6 @@ DDL Expression Constructs API
 .. autoclass:: BaseDDLElement
     :members:
 
-.. autoattr:: DDLElement
-
 .. autoclass:: ExecutableDDLElement
     :members:
 
index 4c6cfc8409921ec6f31d06c3cf715b7fc7e71495..fda2b65ed9c19c85a116187d2e858dd8c1142f82 100644 (file)
@@ -20,3 +20,5 @@ Language provides a schema-centric usage paradigm.
 
 .. toctree::
    :hidden:
+
+    tutorial
\ No newline at end of file
index 551fe918c163c13a2b5e77ac7ab124bcfb35d307..38edab642e6ad9091c77bbdc7fdc30d0bba2aad0 100644 (file)
@@ -384,7 +384,7 @@ at once, such as::
     :ref:`multipart_schema_names` - describes use of dotted schema names
     with the SQL Server dialect.
 
-    :ref:`schema_table_reflection`
+    :ref:`metadata_reflection_schemas`
 
 
 .. _schema_metadata_schema_name:
index f91a7453e6b20e35384138f1808a3fbb459fd625..7002722c6db27acb827f0ffc699a7508a3b30e98 100644 (file)
@@ -139,7 +139,7 @@ a :class:`_schema.MetaData` object configured with a default schema name
 
     >>> metadata_obj = MetaData(schema="project")
 
-The :method:`.MetaData.reflect` will then utilize that configured ``.schema``
+The :meth:`.MetaData.reflect` will then utilize that configured ``.schema``
 for reflection::
 
     >>> # uses `schema` configured in metadata_obj
index 9de56338ff9e392453687fa3a980e1779d8795ea..c107e4ca6d24632fb97aece3c892cb098e25147a 100644 (file)
@@ -29,6 +29,10 @@ they originate from :mod:`sqlalchemy.types` or from the local dialect::
 Types which are specific to SQL Server, or have SQL Server-specific
 construction arguments, are as follows:
 
+.. note: where :noindex: is used, indicates a type that is not redefined
+   in the dialect module, just imported from sqltypes.  this avoids warnings
+   in the sphinx build
+
 .. currentmodule:: sqlalchemy.dialects.mssql
 
 .. autoclass:: BIT
@@ -37,6 +41,7 @@ construction arguments, are as follows:
 
 .. autoclass:: CHAR
    :members: __init__
+   :noindex:
 
 
 .. autoclass:: DATETIME2
@@ -61,6 +66,7 @@ construction arguments, are as follows:
 
 .. autoclass:: NCHAR
    :members: __init__
+   :noindex:
 
 
 .. autoclass:: NTEXT
@@ -69,7 +75,7 @@ construction arguments, are as follows:
 
 .. autoclass:: NVARCHAR
    :members: __init__
-
+   :noindex:
 
 .. autoclass:: REAL
    :members: __init__
@@ -91,7 +97,7 @@ construction arguments, are as follows:
 
 .. autoclass:: TEXT
    :members: __init__
-
+   :noindex:
 
 .. autoclass:: TIME
    :members: __init__
@@ -110,9 +116,11 @@ construction arguments, are as follows:
 
 .. autoclass:: VARBINARY
    :members: __init__
+   :noindex:
 
 .. autoclass:: VARCHAR
    :members: __init__
+   :noindex:
 
 
 .. autoclass:: XML
index 4ad43cf56cb1a8836c2af97501b05da6e78175a3..83aa30bcbd18d77fd1c352f4ded50e5f49380def 100644 (file)
@@ -29,6 +29,10 @@ valid with MySQL are importable from the top level dialect::
 Types which are specific to MySQL, or have MySQL-specific
 construction arguments, are as follows:
 
+.. note: where :noindex: is used, indicates a type that is not redefined
+   in the dialect module, just imported from sqltypes.  this avoids warnings
+   in the sphinx build
+
 .. currentmodule:: sqlalchemy.dialects.mysql
 
 .. autoclass:: BIGINT
@@ -36,6 +40,7 @@ construction arguments, are as follows:
 
 
 .. autoclass:: BINARY
+    :noindex:
     :members: __init__
 
 
@@ -45,10 +50,12 @@ construction arguments, are as follows:
 
 .. autoclass:: BLOB
     :members: __init__
+    :noindex:
 
 
 .. autoclass:: BOOLEAN
     :members: __init__
+    :noindex:
 
 
 .. autoclass:: CHAR
@@ -57,6 +64,7 @@ construction arguments, are as follows:
 
 .. autoclass:: DATE
     :members: __init__
+    :noindex:
 
 
 .. autoclass:: DATETIME
@@ -131,6 +139,7 @@ construction arguments, are as follows:
 
 .. autoclass:: TEXT
     :members: __init__
+    :noindex:
 
 
 .. autoclass:: TIME
@@ -155,6 +164,7 @@ construction arguments, are as follows:
 
 .. autoclass:: VARBINARY
     :members: __init__
+    :noindex:
 
 
 .. autoclass:: VARCHAR
index d3c9928c71b1abf54667d30fa2bcb93aab86cc7c..dc1f7a21e41b364e820a4236cc8460da914b2143 100644 (file)
@@ -22,6 +22,10 @@ they originate from :mod:`sqlalchemy.types` or from the local dialect::
 Types which are specific to PostgreSQL, or have PostgreSQL-specific
 construction arguments, are as follows:
 
+.. note: where :noindex: is used, indicates a type that is not redefined
+   in the dialect module, just imported from sqltypes.  this avoids warnings
+   in the sphinx build
+
 .. currentmodule:: sqlalchemy.dialects.postgresql
 
 .. autoclass:: aggregate_order_by
@@ -80,6 +84,7 @@ construction arguments, are as follows:
 
 .. autoclass:: REAL
     :members: __init__
+    :noindex:
 
 .. autoclass:: REGCLASS
 
index 2e74113089cf80e541ffacd7c24b9a76456b79e6..a54d7715e5a5bf76c99c3cd360875abdafbca717 100644 (file)
@@ -25,6 +25,19 @@ Glossary
 
             :ref:`migration_20_toplevel`
 
+
+    imperative
+    declarative
+
+        In the SQLAlchemy ORM, these terms refer to two different styles of
+        mapping Python classes to database tables.
+
+        .. seealso::
+
+            :ref:`orm_declarative_mapping`
+
+            :ref:`orm_imperative_mapping`
+
     facade
 
         An object that serves as a front-facing interface masking more complex
@@ -1453,3 +1466,11 @@ Glossary
 
             :ref:`session_object_states`
 
+    attached
+        Indicates an ORM object that is presently associated with a specific
+        :term:`Session`.
+
+        .. seealso::
+
+            :ref:`session_object_states`
+
index f27202d334d87ee5e3c3d3fb7e4c0737bb19eb19..cfab3c543380b05acdf60e1739c4b9c8af9c3711 100644 (file)
@@ -161,3 +161,4 @@ SQLAlchemy Documentation
     * :doc:`Error Message Guide <errors>` - Explainations of many SQLAlchemy Errors
     * :doc:`Complete table of of contents <contents>`
     * :doc:`Index <index>`
+
index 716fea74e34a4b512443526816befb3da4d6a3c3..b34ce7f1456a021f7ab018b4bf4f8072a95acebc 100644 (file)
@@ -658,8 +658,6 @@ Various internal methods.
 
 .. autofunction:: bulk_replace
 
-.. autoclass:: collection
-
 .. autodata:: collection_adapter
 
 .. autoclass:: CollectionAdapter
index 5cd2ab441376023074d30febd3ae24de66f4f352..f821b271f0ddc3a0d9003a6459f8ccebe20658d9 100644 (file)
@@ -22,7 +22,7 @@ Architecture <https://martinfowler.com/eaaCatalog/registry.html>`_.
 .. warning::
 
     The :class:`.scoped_session` registry by default uses a Python
-    `threading.local() <https://docs.python.org/3/library/threading.html#thread-local-data>`_
+    ``threading.local()``
     in order to track :class:`_orm.Session` instances.   **This is not
     necessarily compatible with all application servers**, particularly those
     which make use of greenlets or other alternative forms of concurrency
index cf51ee9a6cdcdbad751152a323227be9ae9470a4..b788c3b617287595b194c801af578a035d5db99c 100644 (file)
@@ -592,4 +592,4 @@ API Documentation
    :members:
    :inherited-members:
 
-.. autodata:: ASSOCIATION_PROXY
+.. autoclass:: AssociationProxyExtensionType
index 16cdafebcca42d859298ff60efbddbb23648cf8b..571aca72221e10982edc6c1d32dcc056036f5eb7 100644 (file)
@@ -15,8 +15,6 @@ API Reference
     :members:
 
 .. autoclass:: Comparator
-     
 
-.. autodata:: HYBRID_METHOD
 
-.. autodata:: HYBRID_PROPERTY
+.. autoclass:: HybridExtensionType
index 9aa3b2db67998cc2cabea97f47176a39d2a00922..ee006427110d82a3ba39d36024369d3116d4cf01 100644 (file)
@@ -16,7 +16,6 @@ sections, are listed here.
 
 .. autoclass:: ClassManager
     :members:
-    :inherited-members:
 
 .. autoclass:: ColumnProperty
     :members:
index 41afa768b7f39c27e606dd466842f934a30d5de2..e1b2b78c8fe7aff61dfe731f62ace27a2a244853 100644 (file)
@@ -189,7 +189,7 @@ Imperative Mapping with Dataclasses and Attrs
 ---------------------------------------------
 
 As described in the section :ref:`orm_declarative_dataclasses`, the
-``@dataclass`` decorator and the attrs_ library both work as class
+``@dataclass`` decorator and the ``attrs`` library both work as class
 decorators that are applied to a class first, before it is passed to
 SQLAlchemy for mapping.   Just like we can use the
 :meth:`_orm.registry.mapped` decorator in order to apply declarative-style
index f6b1eefae170bcfc4a4243eef0e73f8ec7c88d61..f184c4c446b02b76769b2a9fe3e276aec6abefb7 100644 (file)
@@ -1101,8 +1101,8 @@ matching objects locally present in the :class:`_orm.Session`. See the section
 Inspecting entities and columns from ORM-enabled SELECT and DML statements
 ==========================================================================
 
-The :func:`.select` construct, as well as the :func:`.insert`, :func:`.update`
-and :func:`.delete` constructs (for the latter DML constructs, as of SQLAlchemy
+The :func:`_sql.select` construct, as well as the :func:`_sql.insert`, :func:`_sql.update`
+and :func:`_sql.delete` constructs (for the latter DML constructs, as of SQLAlchemy
 1.4.33), all support the ability to inspect the entities in which these
 statements are created against, as well as the columns and datatypes that would
 be returned in a result set.
@@ -1158,7 +1158,7 @@ cases::
    this would raise ``NotImplementedError``.
 
 
-For :func:`.insert`, :func:`.update` and :func:`.delete` constructs, there are
+For :func:`_sql.insert`, :func:`.update` and :func:`.delete` constructs, there are
 two separate attributes. One is :attr:`.UpdateBase.entity_description` which
 returns information about the primary ORM entity and database table which the
 DML construct would be affecting::
index 8e88eb2f75d159928e9375458a68a2ab7858e5bc..46236a6e97d0e8642c58b06f25c71a8a3a92514c 100644 (file)
@@ -174,6 +174,7 @@ order to refer to additional tables::
   SET address.email_address=%s, user_account.fullname=%s
   WHERE user_account.id = address.user_id AND address.email_address = %s
 
+.. _tutorial_parameter_ordered_updates:
 
 Parameter Ordered Updates
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
index ecf45f5aa32d1882f8d1e335dad17dd07d1bebcf..cc5cb660c4598ba1eb503d3a846fe5dc74e22f11 100644 (file)
@@ -141,8 +141,6 @@ verify that we are on  **version 2.0** of SQLAlchemy:
     >>> sqlalchemy.__version__  # doctest: +SKIP
     2.0.0
 
-.. rst-class:: core-header, orm-dependency
-
 
 
 
index c923f701415c801e53e5ba314c28f45cdc0f3d30..987e36ed9401da2ab335f2dfa722fe4dc8c23efd 100644 (file)
@@ -285,7 +285,7 @@ Remote-Schema Table Introspection and PostgreSQL search_path
     attribute set up.
 
 The PostgreSQL dialect can reflect tables from any schema, as outlined in
-:ref:`schema_table_reflection`.
+:ref:`metadata_reflection_schemas`.
 
 With regards to tables which these :class:`_schema.Table`
 objects refer to via foreign key constraint, a decision must be made as to how
index 80e458e7c0094d2c2dc193269388a13456c74650..b2bdd6a8d3621a2bf1766438a7d0a7e4d77b3216 100644 (file)
@@ -87,22 +87,22 @@ NO_OPTIONS: Mapping[str, Any] = util.EMPTY_DICT
 class Connection(ConnectionEventsTarget, inspection.Inspectable["Inspector"]):
     """Provides high-level functionality for a wrapped DB-API connection.
 
-    The :class:`_engine.Connection` object is procured by calling
-    the :meth:`_engine.Engine.connect` method of the :class:`_engine.Engine`
+    The :class:`_engine.Connection` object is procured by calling the
+    :meth:`_engine.Engine.connect` method of the :class:`_engine.Engine`
     object, and provides services for execution of SQL statements as well
     as transaction control.
 
-    The Connection object is **not** thread-safe.  While a Connection can be
+    The Connection object is **not** thread-safe. While a Connection can be
     shared among threads using properly synchronized access, it is still
     possible that the underlying DBAPI connection may not support shared
-    access between threads.  Check the DBAPI documentation for details.
+    access between threads. Check the DBAPI documentation for details.
 
     The Connection object represents a single DBAPI connection checked out
-    from the connection pool. In this state, the connection pool has no affect
-    upon the connection, including its expiration or timeout state. For the
-    connection pool to properly manage connections, connections should be
-    returned to the connection pool (i.e. ``connection.close()``) whenever the
-    connection is not in use.
+    from the connection pool. In this state, the connection pool has no
+    affect upon the connection, including its expiration or timeout state.
+    For the connection pool to properly manage connections, connections
+    should be returned to the connection pool (i.e. ``connection.close()``)
+    whenever the connection is not in use.
 
     .. index::
       single: thread safety; Connection
@@ -2631,6 +2631,12 @@ class Engine(
 
     @property
     def engine(self) -> Engine:
+        """Returns this :class:`.Engine`.
+
+        Used for legacy schemes that accept :class:`.Connection` /
+        :class:`.Engine` objects within the same variable.
+
+        """
         return self
 
     def clear_compiled_cache(self) -> None:
index d5f0d8126318e82bf877ec40c29a03fad076270a..ec1e1abe187d199f7ed9f5f2290b74a75d13f0e3 100644 (file)
@@ -7,7 +7,7 @@
 # mypy: allow-untyped-defs, allow-untyped-calls
 
 """Define cursor-specific result set constructs including
-:class:`.BaseCursorResult`, :class:`.CursorResult`."""
+:class:`.CursorResult`."""
 
 
 from __future__ import annotations
index f2a69e9cd9f40be2dfdb40bcdbf82e39426af277..eac2e58063b4c204b3a51e8706696310e0939eca 100644 (file)
@@ -747,8 +747,8 @@ class AsyncSession(ReversibleProxy[Session]):
         This method may also be used to establish execution options for the
         database connection used by the current transaction.
 
-        .. versionadded:: 1.4.24  Added **kw arguments which are passed through
-           to the underlying :meth:`_orm.Session.connection` method.
+        .. versionadded:: 1.4.24  Added \**kw arguments which are passed
+           through to the underlying :meth:`_orm.Session.connection` method.
 
         .. seealso::
 
index 86166f9f6cde708732ba4fdf0589609aeca6ed2e..d16bf36b30891f6600d10391f70e59200aaf3bb0 100644 (file)
@@ -55,10 +55,12 @@ from .sql.schema import DefaultGenerator as DefaultGenerator
 from .sql.schema import FetchedValue as FetchedValue
 from .sql.schema import ForeignKey as ForeignKey
 from .sql.schema import ForeignKeyConstraint as ForeignKeyConstraint
+from .sql.schema import HasConditionalDDL as HasConditionalDDL
 from .sql.schema import Identity as Identity
 from .sql.schema import Index as Index
 from .sql.schema import MetaData as MetaData
 from .sql.schema import PrimaryKeyConstraint as PrimaryKeyConstraint
+from .sql.schema import SchemaConst as SchemaConst
 from .sql.schema import SchemaItem as SchemaItem
 from .sql.schema import Sequence as Sequence
 from .sql.schema import Table as Table
index 4729799525fb9526c5c80ee308aadb305b3f8a3e..598bacc593ec0f31d9ecfdb861fea1da450353c2 100644 (file)
@@ -1450,7 +1450,7 @@ class Column(DialectKWArgs, SchemaItem, ColumnClause[_T]):
             value automatically for this column, which will be accessible
             after the statement is invoked via the
             :attr:`.CursorResult.inserted_primary_key` attribute upon the
-            :class:`.Result` object.   This also applies towards use of the
+            :class:`_result.Result` object.   This also applies towards use of the
             ORM when ORM-mapped objects are persisted to the database,
             indicating that a new integer primary key will be available to
             become part of the :term:`identity key` for that object.  This
@@ -1497,9 +1497,9 @@ class Column(DialectKWArgs, SchemaItem, ColumnClause[_T]):
                 Column('id', ForeignKey('other.id'),
                             primary_key=True, autoincrement='ignore_fk')
 
-            It is typically not desirable to have "autoincrement" enabled on a
-            column that refers to another via foreign key, as such a column is
-            required to refer to a value that originates from elsewhere.
+          It is typically not desirable to have "autoincrement" enabled on a
+          column that refers to another via foreign key, as such a column is
+          required to refer to a value that originates from elsewhere.
 
           The setting has these effects on columns that meet the
           above criteria:
@@ -1537,9 +1537,9 @@ class Column(DialectKWArgs, SchemaItem, ColumnClause[_T]):
             using a method specific to the database driver in use:
 
             * MySQL, SQLite - calling upon ``cursor.lastrowid()``
-             (see
-             `https://www.python.org/dev/peps/pep-0249/#lastrowid
-             <https://www.python.org/dev/peps/pep-0249/#lastrowid>`_)
+              (see
+              `https://www.python.org/dev/peps/pep-0249/#lastrowid
+              <https://www.python.org/dev/peps/pep-0249/#lastrowid>`_)
             * PostgreSQL, SQL Server, Oracle - use RETURNING or an equivalent
               construct when rendering an INSERT statement, and then retrieving
               the newly generated primary key values after execution
@@ -1564,7 +1564,6 @@ class Column(DialectKWArgs, SchemaItem, ColumnClause[_T]):
             "fast insertmany" feature.  Such features are very new and
             may not yet be well covered in documentation.
 
-
         :param default: A scalar, Python callable, or
             :class:`_expression.ColumnElement` expression representing the
             *default value* for this column, which will be invoked upon insert
index fd98f17e32fdda7dcb3af2166bec9d1711fe85e7..733def3779759cdd72795f28ece80928bfc371cc 100644 (file)
@@ -1078,7 +1078,7 @@ class SelectLabelStyle(Enum):
 
     Below, all column names are given a label so that the two same-named
     columns ``columna`` are disambiguated as ``table1_columna`` and
-    ``table2_columna`::
+    ``table2_columna``::
 
         >>> from sqlalchemy import table, column, select, true, LABEL_STYLE_TABLENAME_PLUS_COL
         >>> table1 = table("table1", column("columna"), column("columnb"))
index e54f3347582769da5fc445729e12cc5a65d52e96..a23bee875341901482d623a0a5d33da6638a1ace 100644 (file)
@@ -1225,7 +1225,11 @@ class HasMemoized:
         self._memoized_keys |= {key}
 
     class memoized_attribute(memoized_property[_T]):
-        """A read-only @property that is only evaluated once."""
+        """A read-only @property that is only evaluated once.
+
+        :meta private:
+
+        """
 
         fget: Callable[..., _T]
         __doc__: Optional[str]
@@ -1254,7 +1258,11 @@ class HasMemoized:
 
     @classmethod
     def memoized_instancemethod(cls, fn: _F) -> _F:
-        """Decorate a method memoize its return value."""
+        """Decorate a method memoize its return value.
+
+        :meta private:
+
+        """
 
         def oneshot(self: Any, *args: Any, **kw: Any) -> Any:
             result = fn(self, *args, **kw)