]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- 2.0.21 rel_2_0_21
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 18 Sep 2023 21:02:11 +0000 (17:02 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 18 Sep 2023 21:02:11 +0000 (17:02 -0400)
18 files changed:
doc/build/changelog/changelog_20.rst
doc/build/changelog/unreleased_20/10131.rst [deleted file]
doc/build/changelog/unreleased_20/10226.rst [deleted file]
doc/build/changelog/unreleased_20/10264.rst [deleted file]
doc/build/changelog/unreleased_20/10269.rst [deleted file]
doc/build/changelog/unreleased_20/10275.rst [deleted file]
doc/build/changelog/unreleased_20/10279.rst [deleted file]
doc/build/changelog/unreleased_20/10280.rst [deleted file]
doc/build/changelog/unreleased_20/10288.rst [deleted file]
doc/build/changelog/unreleased_20/10321.rst [deleted file]
doc/build/changelog/unreleased_20/10337.rst [deleted file]
doc/build/changelog/unreleased_20/10342.rst [deleted file]
doc/build/changelog/unreleased_20/10348.rst [deleted file]
doc/build/changelog/unreleased_20/10353.rst [deleted file]
doc/build/changelog/unreleased_20/9610.rst [deleted file]
doc/build/changelog/unreleased_20/9873.rst [deleted file]
doc/build/changelog/unreleased_20/9878.rst [deleted file]
doc/build/conf.py

index 6051c7946072bcc483b905f63ab7700f21f6698d..9c0474854c50ee52cc8cc45c3f4eee1ec51ae2fe 100644 (file)
 
 .. changelog::
     :version: 2.0.21
-    :include_notes_from: unreleased_20
+    :released: September 18, 2023
+
+    .. change::
+        :tags: bug, sql
+        :tickets: 9610
+
+        Adjusted the operator precedence for the string concatenation operator to
+        be equal to that of string matching operators, such as
+        :meth:`.ColumnElement.like`, :meth:`.ColumnElement.regexp_match`,
+        :meth:`.ColumnElement.match`, etc., as well as plain ``==`` which has the
+        same precedence as string comparison operators, so that parenthesis will be
+        applied to a string concatenation expression that follows a string match
+        operator. This provides for backends such as PostgreSQL where the "regexp
+        match" operator is apparently of higher precedence than the string
+        concatenation operator.
+
+    .. change::
+        :tags: bug, sql
+        :tickets: 10342
+
+        Qualified the use of ``hashlib.md5()`` within the DDL compiler, which is
+        used to generate deterministic four-character suffixes for long index and
+        constraint names in DDL statements, to include the Python 3.9+
+        ``usedforsecurity=False`` parameter so that Python interpreters built for
+        restricted environments such as FIPS do not consider this call to be
+        related to security concerns.
+
+    .. change::
+        :tags: bug, postgresql
+        :tickets: 10226
+
+        Fixed regression which appeared in 2.0 due to :ticket:`8491` where the
+        revised "ping" used for PostgreSQL dialects when the
+        :paramref:`_sa.create_engine.pool_pre_ping` parameter is in use would
+        interfere with the use of asyncpg with PGBouncer "transaction" mode, as the
+        multiple PostgreSQL commands emitted by asnycpg could be broken out among
+        multiple connections leading to errors, due to the lack of any transaction
+        around this newly revised "ping".   The ping is now invoked within a
+        transaction, in the same way that is implicit with all other backends that
+        are based on the pep-249 DBAPI; this guarantees that the series of PG
+        commands sent by asyncpg for this command are invoked on the same backend
+        connection without it jumping to a different connection mid-command.  The
+        transaction is not used if the asyncpg dialect is used in "AUTOCOMMIT"
+        mode, which remains incompatible with pgbouncer transaction mode.
+
+
+    .. change::
+        :tags: bug, orm
+        :tickets: 10279
+
+        Adjusted the ORM's interpretation of the "target" entity used within
+        :class:`.Update` and :class:`.Delete` to not interfere with the target
+        "from" object passed to the statement, such as when passing an ORM-mapped
+        :class:`_orm.aliased` construct that should be maintained within a phrase
+        like "UPDATE FROM".  Cases like ORM session synchonize using "SELECT"
+        statements such as with MySQL/ MariaDB will still have issues with
+        UPDATE/DELETE of this form so it's best to disable synchonize_session when
+        using DML statements of this type.
+
+    .. change::
+        :tags: bug, orm
+        :tickets: 10348
+
+        Added new capability to the :func:`_orm.selectin_polymorphic` loader option
+        which allows other loader options to be bundled as siblings, referring to
+        one of its subclasses, within the sub-options of parent loader option.
+        Previously, this pattern was only supported if the
+        :func:`_orm.selectin_polymorphic` were at the top level of the options for
+        the query.   See new documentation section for example.
+
+        As part of this change, improved the behavior of the
+        :meth:`_orm.Load.selectin_polymorphic` method / loader strategy so that the
+        subclass load does not load most already-loaded columns from the parent
+        table, when the option is used against a class that is already being
+        relationship-loaded.  Previously, the logic to load only the subclass
+        columns worked only for a top level class load.
+
+        .. seealso::
+
+            :ref:`polymorphic_selectin_as_loader_option_target_plus_opts`
+
+    .. change::
+        :tags: bug, typing
+        :tickets: 10264, 9284
+
+        Fixed regression introduced in 2.0.20 via :ticket:`9600` fix which
+        attempted to add more formal typing to
+        :paramref:`_schema.MetaData.naming_convention`. This change prevented basic
+        naming convention dictionaries from passing typing and has been adjusted so
+        that a plain dictionary of strings for keys as well as dictionaries that
+        use constraint types as keys or a mix of both, are again accepted.
+
+        As part of this change, lesser used forms of the naming convention
+        dictionary are also typed, including that it currently allows for
+        ``Constraint`` type objects as keys as well.
+
+    .. change::
+        :tags: usecase, typing
+        :tickets: 10288
+
+        Made the contained type for :class:`.Mapped` covariant; this is to allow
+        greater flexibility for end-user typing scenarios, such as the use of
+        protocols to represent particular mapped class structures that are passed
+        to other functions. As part of this change, the contained type was also
+        made covariant for dependent and related types such as
+        :class:`_orm.base.SQLORMOperations`, :class:`_orm.WriteOnlyMapped`, and
+        :class:`_sql.SQLColumnExpression`. Pull request courtesy Roméo Després.
+
+
+    .. change::
+        :tags: bug, engine
+        :tickets: 10275
+
+        Fixed a series of reflection issues affecting the PostgreSQL,
+        MySQL/MariaDB, and SQLite dialects when reflecting foreign key constraints
+        where the target column contained parenthesis in one or both of the table
+        name or column name.
+
+
+    .. change::
+        :tags: bug, sql
+        :tickets: 10280
+
+        The :class:`.Values` construct will now automatically create a proxy (i.e.
+        a copy) of a :class:`_sql.column` if the column were already associated
+        with an existing FROM clause.  This allows that an expression like
+        ``values_obj.c.colname`` will produce the correct FROM clause even in the
+        case that ``colname`` was passed as a :class:`_sql.column` that was already
+        used with a previous :class:`.Values` or other table construct.
+        Originally this was considered to be a candidate for an error condition,
+        however it's likely this pattern is already in widespread use so it's
+        now added to support.
+
+    .. change::
+        :tags: bug, setup
+        :tickets: 10321
+
+        Fixed very old issue where the full extent of SQLAlchemy modules, including
+        ``sqlalchemy.testing.fixtures``, could not be imported outside of a pytest
+        run. This suits inspection utilities such as ``pkgutil`` that attempt to
+        import all installed modules in all packages.
+
+    .. change::
+        :tags: usecase, sql
+        :tickets: 10269
+
+        Adjusted the :class:`_types.Enum` datatype to accept an argument of
+        ``None`` for the :paramref:`_types.Enum.length` parameter, resulting in a
+        VARCHAR or other textual type with no length in the resulting DDL. This
+        allows for new elements of any length to be added to the type after it
+        exists in the schema.  Pull request courtesy Eugene Toder.
+
+
+    .. change::
+        :tags: bug, typing
+        :tickets: 9878
+
+        Fixed the type annotation for ``__class_getitem__()`` as applied to the
+        ``Visitable`` class at the base of expression constructs to accept ``Any``
+        for a key, rather than ``str``, which helps with some IDEs such as PyCharm
+        when attempting to write typing annotations for SQL constructs which
+        include generic selectors.  Pull request courtesy Jordan Macdonald.
+
+
+    .. change::
+        :tags: bug, typing
+        :tickets: 10353
+
+        Repaired the core "SQL element" class ``SQLCoreOperations`` to support the
+        ``__hash__()`` method from a typing perspective, as objects like
+        :class:`.Column` and ORM :class:`.InstrumentedAttribute` are hashable and
+        are used as dictionary keys in the public API for the :class:`_dml.Update`
+        and :class:`_dml.Insert` constructs.  Previously, type checkers were not
+        aware the root SQL element was hashable.
+
+    .. change::
+        :tags: bug, typing
+        :tickets: 10337
+
+        Fixed typing issue with :meth:`_sql.Existing.select_from` that
+        prevented its use with ORM classes.
+
+    .. change::
+        :tags: usecase, sql
+        :tickets: 9873
+
+        Added new generic SQL function :class:`_functions.aggregate_strings`, which
+        accepts a SQL expression and a decimeter, concatenating strings on multiple
+        rows into a single aggregate value. The function is compiled on a
+        per-backend basis, into functions such as ``group_concat(),``
+        ``string_agg()``, or ``LISTAGG()``.
+        Pull request courtesy Joshua Morris.
+
+    .. change::
+        :tags: typing, bug
+        :tickets: 10131
+
+        Update type annotations for ORM loading options, restricting them to accept
+        only `"*"` instead of any string for string arguments.  Pull request
+        courtesy Janek Nouvertné.
 
 .. changelog::
     :version: 2.0.20
diff --git a/doc/build/changelog/unreleased_20/10131.rst b/doc/build/changelog/unreleased_20/10131.rst
deleted file mode 100644 (file)
index b82b721..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-.. change::
-    :tags: typing, bug
-    :tickets: 10131
-
-    Update type annotations for ORM loading options, restricting them to accept
-    only `"*"` instead of any string for string arguments.  Pull request
-    courtesy Janek Nouvertné.
diff --git a/doc/build/changelog/unreleased_20/10226.rst b/doc/build/changelog/unreleased_20/10226.rst
deleted file mode 100644 (file)
index 420ef35..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-.. change::
-    :tags: bug, postgresql
-    :tickets: 10226
-
-    Fixed regression which appeared in 2.0 due to :ticket:`8491` where the
-    revised "ping" used for PostgreSQL dialects when the
-    :paramref:`_sa.create_engine.pool_pre_ping` parameter is in use would
-    interfere with the use of asyncpg with PGBouncer "transaction" mode, as the
-    multiple PostgreSQL commands emitted by asnycpg could be broken out among
-    multiple connections leading to errors, due to the lack of any transaction
-    around this newly revised "ping".   The ping is now invoked within a
-    transaction, in the same way that is implicit with all other backends that
-    are based on the pep-249 DBAPI; this guarantees that the series of PG
-    commands sent by asyncpg for this command are invoked on the same backend
-    connection without it jumping to a different connection mid-command.  The
-    transaction is not used if the asyncpg dialect is used in "AUTOCOMMIT"
-    mode, which remains incompatible with pgbouncer transaction mode.
-
diff --git a/doc/build/changelog/unreleased_20/10264.rst b/doc/build/changelog/unreleased_20/10264.rst
deleted file mode 100644 (file)
index bdfd5b9..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-.. change::
-    :tags: bug, typing
-    :tickets: 10264, 9284
-
-    Fixed regression introduced in 2.0.20 via :ticket:`9600` fix which
-    attempted to add more formal typing to
-    :paramref:`_schema.MetaData.naming_convention`. This change prevented basic
-    naming convention dictionaries from passing typing and has been adjusted so
-    that a plain dictionary of strings for keys as well as dictionaries that
-    use constraint types as keys or a mix of both, are again accepted.
-
-    As part of this change, lesser used forms of the naming convention
-    dictionary are also typed, including that it currently allows for
-    ``Constraint`` type objects as keys as well.
diff --git a/doc/build/changelog/unreleased_20/10269.rst b/doc/build/changelog/unreleased_20/10269.rst
deleted file mode 100644 (file)
index 615c1a1..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-.. change::
-    :tags: usecase, sql
-    :tickets: 10269
-
-    Adjusted the :class:`_types.Enum` datatype to accept an argument of
-    ``None`` for the :paramref:`_types.Enum.length` parameter, resulting in a
-    VARCHAR or other textual type with no length in the resulting DDL. This
-    allows for new elements of any length to be added to the type after it
-    exists in the schema.  Pull request courtesy Eugene Toder.
-
diff --git a/doc/build/changelog/unreleased_20/10275.rst b/doc/build/changelog/unreleased_20/10275.rst
deleted file mode 100644 (file)
index a3eb576..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-.. change::
-    :tags: bug, engine
-    :tickets: 10275
-
-    Fixed a series of reflection issues affecting the PostgreSQL,
-    MySQL/MariaDB, and SQLite dialects when reflecting foreign key constraints
-    where the target column contained parenthesis in one or both of the table
-    name or column name.
-
diff --git a/doc/build/changelog/unreleased_20/10279.rst b/doc/build/changelog/unreleased_20/10279.rst
deleted file mode 100644 (file)
index f7d29a3..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-.. change::
-    :tags: bug, orm
-    :tickets: 10279
-
-    Adjusted the ORM's interpretation of the "target" entity used within
-    :class:`.Update` and :class:`.Delete` to not interfere with the target
-    "from" object passed to the statement, such as when passing an ORM-mapped
-    :class:`_orm.aliased` construct that should be maintained within a phrase
-    like "UPDATE FROM".  Cases like ORM session synchonize using "SELECT"
-    statements such as with MySQL/ MariaDB will still have issues with
-    UPDATE/DELETE of this form so it's best to disable synchonize_session when
-    using DML statements of this type.
diff --git a/doc/build/changelog/unreleased_20/10280.rst b/doc/build/changelog/unreleased_20/10280.rst
deleted file mode 100644 (file)
index 6b4c640..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-.. change::
-    :tags: bug, sql
-    :tickets: 10280
-
-    The :class:`.Values` construct will now automatically create a proxy (i.e.
-    a copy) of a :class:`_sql.column` if the column were already associated
-    with an existing FROM clause.  This allows that an expression like
-    ``values_obj.c.colname`` will produce the correct FROM clause even in the
-    case that ``colname`` was passed as a :class:`_sql.column` that was already
-    used with a previous :class:`.Values` or other table construct.
-    Originally this was considered to be a candidate for an error condition,
-    however it's likely this pattern is already in widespread use so it's
-    now added to support.
diff --git a/doc/build/changelog/unreleased_20/10288.rst b/doc/build/changelog/unreleased_20/10288.rst
deleted file mode 100644 (file)
index 18b0bb0..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-.. change::
-    :tags: usecase, typing
-    :tickets: 10288
-
-    Made the contained type for :class:`.Mapped` covariant; this is to allow
-    greater flexibility for end-user typing scenarios, such as the use of
-    protocols to represent particular mapped class structures that are passed
-    to other functions. As part of this change, the contained type was also
-    made covariant for dependent and related types such as
-    :class:`_orm.base.SQLORMOperations`, :class:`_orm.WriteOnlyMapped`, and
-    :class:`_sql.SQLColumnExpression`. Pull request courtesy Roméo Després.
-
diff --git a/doc/build/changelog/unreleased_20/10321.rst b/doc/build/changelog/unreleased_20/10321.rst
deleted file mode 100644 (file)
index 6186133..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-.. change::
-    :tags: bug, setup
-    :tickets: 10321
-
-    Fixed very old issue where the full extent of SQLAlchemy modules, including
-    ``sqlalchemy.testing.fixtures``, could not be imported outside of a pytest
-    run. This suits inspection utilities such as ``pkgutil`` that attempt to
-    import all installed modules in all packages.
diff --git a/doc/build/changelog/unreleased_20/10337.rst b/doc/build/changelog/unreleased_20/10337.rst
deleted file mode 100644 (file)
index 26020d7..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-.. change::
-    :tags: bug, typing
-    :tickets: 10337
-
-    Fixed typing issue with :meth:`_sql.Existing.select_from` that
-    prevented its use with ORM classes.
diff --git a/doc/build/changelog/unreleased_20/10342.rst b/doc/build/changelog/unreleased_20/10342.rst
deleted file mode 100644 (file)
index 800ea73..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-.. change::
-    :tags: bug, sql
-    :tickets: 10342
-
-    Qualified the use of ``hashlib.md5()`` within the DDL compiler, which is
-    used to generate deterministic four-character suffixes for long index and
-    constraint names in DDL statements, to include the Python 3.9+
-    ``usedforsecurity=False`` parameter so that Python interpreters built for
-    restricted environments such as FIPS do not consider this call to be
-    related to security concerns.
diff --git a/doc/build/changelog/unreleased_20/10348.rst b/doc/build/changelog/unreleased_20/10348.rst
deleted file mode 100644 (file)
index b7f0ded..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-.. change::
-    :tags: bug, orm
-    :tickets: 10348
-
-    Added new capability to the :func:`_orm.selectin_polymorphic` loader option
-    which allows other loader options to be bundled as siblings, referring to
-    one of its subclasses, within the sub-options of parent loader option.
-    Previously, this pattern was only supported if the
-    :func:`_orm.selectin_polymorphic` were at the top level of the options for
-    the query.   See new documentation section for example.
-
-    As part of this change, improved the behavior of the
-    :meth:`_orm.Load.selectin_polymorphic` method / loader strategy so that the
-    subclass load does not load most already-loaded columns from the parent
-    table, when the option is used against a class that is already being
-    relationship-loaded.  Previously, the logic to load only the subclass
-    columns worked only for a top level class load.
-
-    .. seealso::
-
-        :ref:`polymorphic_selectin_as_loader_option_target_plus_opts`
diff --git a/doc/build/changelog/unreleased_20/10353.rst b/doc/build/changelog/unreleased_20/10353.rst
deleted file mode 100644 (file)
index 7f00aa7..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-.. change::
-    :tags: bug, typing
-    :tickets: 10353
-
-    Repaired the core "SQL element" class ``SQLCoreOperations`` to support the
-    ``__hash__()`` method from a typing perspective, as objects like
-    :class:`.Column` and ORM :class:`.InstrumentedAttribute` are hashable and
-    are used as dictionary keys in the public API for the :class:`_dml.Update`
-    and :class:`_dml.Insert` constructs.  Previously, type checkers were not
-    aware the root SQL element was hashable.
diff --git a/doc/build/changelog/unreleased_20/9610.rst b/doc/build/changelog/unreleased_20/9610.rst
deleted file mode 100644 (file)
index db39086..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-.. change::
-    :tags: bug, sql
-    :tickets: 9610
-
-    Adjusted the operator precedence for the string concatenation operator to
-    be equal to that of string matching operators, such as
-    :meth:`.ColumnElement.like`, :meth:`.ColumnElement.regexp_match`,
-    :meth:`.ColumnElement.match`, etc., as well as plain ``==`` which has the
-    same precedence as string comparison operators, so that parenthesis will be
-    applied to a string concatenation expression that follows a string match
-    operator. This provides for backends such as PostgreSQL where the "regexp
-    match" operator is apparently of higher precedence than the string
-    concatenation operator.
diff --git a/doc/build/changelog/unreleased_20/9873.rst b/doc/build/changelog/unreleased_20/9873.rst
deleted file mode 100644 (file)
index f1071fd..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-.. change::
-    :tags: usecase, sql
-    :tickets: 9873
-
-    Added new generic SQL function :class:`_functions.aggregate_strings`, which
-    accepts a SQL expression and a decimeter, concatenating strings on multiple
-    rows into a single aggregate value. The function is compiled on a
-    per-backend basis, into functions such as ``group_concat(),``
-    ``string_agg()``, or ``LISTAGG()``.
-    Pull request courtesy Joshua Morris.
\ No newline at end of file
diff --git a/doc/build/changelog/unreleased_20/9878.rst b/doc/build/changelog/unreleased_20/9878.rst
deleted file mode 100644 (file)
index 0b6901e..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-.. change::
-    :tags: bug, typing
-    :tickets: 9878
-
-    Fixed the type annotation for ``__class_getitem__()`` as applied to the
-    ``Visitable`` class at the base of expression constructs to accept ``Any``
-    for a key, rather than ``str``, which helps with some IDEs such as PyCharm
-    when attempting to write typing annotations for SQL constructs which
-    include generic selectors.  Pull request courtesy Jordan Macdonald.
-
index 9de1566028fd02d71930874ba4653e4f71cb0966..ec09caf5c4b557216a2451ecd71e8000f81ec203 100644 (file)
@@ -242,9 +242,9 @@ copyright = "2007-2023, the SQLAlchemy authors and contributors"  # noqa
 # The short X.Y version.
 version = "2.0"
 # The full version, including alpha/beta/rc tags.
-release = "2.0.20"
+release = "2.0.21"
 
-release_date = "August 15, 2023"
+release_date = "September 18, 2023"
 
 site_base = os.environ.get("RTD_SITE_BASE", "https://www.sqlalchemy.org")
 site_adapter_template = "docs_adapter.mako"