]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
cherry-pick changelog from 2.0.32
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 5 Aug 2024 19:08:57 +0000 (15:08 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 5 Aug 2024 19:08:57 +0000 (15:08 -0400)
19 files changed:
doc/build/changelog/changelog_20.rst
doc/build/changelog/unreleased_20/10267.rst [deleted file]
doc/build/changelog/unreleased_20/10820.rst [deleted file]
doc/build/changelog/unreleased_20/10834.rst [deleted file]
doc/build/changelog/unreleased_20/11163.rst [deleted file]
doc/build/changelog/unreleased_20/11435.rst [deleted file]
doc/build/changelog/unreleased_20/11471.rst [deleted file]
doc/build/changelog/unreleased_20/11479.rst [deleted file]
doc/build/changelog/unreleased_20/11480.rst [deleted file]
doc/build/changelog/unreleased_20/11522.rst [deleted file]
doc/build/changelog/unreleased_20/11530.rst [deleted file]
doc/build/changelog/unreleased_20/11532.rst [deleted file]
doc/build/changelog/unreleased_20/11575.rst [deleted file]
doc/build/changelog/unreleased_20/11576.rst [deleted file]
doc/build/changelog/unreleased_20/11592.rst [deleted file]
doc/build/changelog/unreleased_20/11625.rst [deleted file]
doc/build/changelog/unreleased_20/11661.rst [deleted file]
doc/build/changelog/unreleased_20/11663.rst [deleted file]
doc/build/changelog/unreleased_20/mypy1110.rst [deleted file]

index ec885b1a488a7b4a31fc8609a953d040a180d239..f6f324bd62b7e4ef03c147c00b96d6d0bd5ea34e 100644 (file)
 
 .. changelog::
     :version: 2.0.32
-    :include_notes_from: unreleased_20
+    :released: August 5, 2024
+
+    .. change::
+        :tags: bug, examples
+        :tickets: 10267
+
+        Fixed issue in history_meta example where the "version" column in the
+        versioned table needs to default to the most recent version number in the
+        history table on INSERT, to suit the use case of a table where rows are
+        deleted, and can then be replaced by new rows that re-use the same primary
+        key identity.  This fix adds an additonal SELECT query per INSERT in the
+        main table, which may be inefficient; for cases where primary keys are not
+        re-used, the default function may be omitted.  Patch courtesy  Philipp H.
+        v. Loewenfeld.
+
+
+    .. change::
+        :tags: oracle, usecase
+        :tickets: 10820
+
+        Added API support for server-side cursors for the oracledb async dialect,
+        allowing use of the :meth:`_asyncio.AsyncConnection.stream` and similar
+        stream methods.
+
+    .. change::
+        :tags: bug, orm
+        :tickets: 10834
+
+        Fixed issue where using the :meth:`_orm.Query.enable_eagerloads` and
+        :meth:`_orm.Query.yield_per` methods at the same time, in order to disable
+        eager loading that's configured on the mapper directly, would be silently
+        ignored, leading to errors or unexpected eager population of attributes.
+
+    .. change::
+        :tags: orm
+        :tickets: 11163
+
+        Added a warning noting when an
+        :meth:`_engine.ConnectionEvents.engine_connect` event may be leaving
+        a transaction open, which can alter the behavior of a
+        :class:`_orm.Session` using such an engine as bind.
+        On SQLAlchemy 2.1 :paramref:`_orm.Session.join_transaction_mode` will
+        instead be ignored in all cases when the session bind is
+        an :class:`_engine.Engine`.
+
+    .. change::
+        :tags: bug, general, regression
+        :tickets: 11435
+
+        Restored legacy class names removed from
+        ``sqlalalchemy.orm.collections.*``, including
+        :class:`_orm.MappedCollection`, :func:`_orm.mapped_collection`,
+        :func:`_orm.column_mapped_collection`,
+        :func:`_orm.attribute_mapped_collection`. Pull request courtesy Takashi
+        Kajinami.
+
+    .. change::
+        :tags: bug, sql
+        :tickets: 11471
+
+        Follow up of :ticket:`11471` to fix caching issue where using the
+        :meth:`.CompoundSelectState.add_cte` method of the
+        :class:`.CompoundSelectState` construct would not set a correct cache key
+        which distinguished between different CTE expressions. Also added tests
+        that would detect issues similar to the one fixed in :ticket:`11544`.
+
+    .. change::
+        :tags: bug, mysql
+        :tickets: 11479
+
+        Fixed issue in MySQL dialect where ENUM values that contained percent signs
+        were not properly escaped for the driver.
+
+
+    .. change::
+        :tags: usecase, oracle
+        :tickets: 11480
+
+        Implemented two-phase transactions for the oracledb dialect. Historically,
+        this feature never worked with the cx_Oracle dialect, however recent
+        improvements to the oracledb successor now allow this to be possible.  The
+        two phase transaction API is available at the Core level via the
+        :meth:`_engine.Connection.begin_twophase` method.
+
+    .. change::
+        :tags: bug, postgresql
+        :tickets: 11522
+
+        It is now considered a pool-invalidating disconnect event when psycopg2
+        throws an "SSL SYSCALL error: Success" error message, which can occur when
+        the SSL connection to Postgres is terminated abnormally.
+
+    .. change::
+        :tags: bug, schema
+        :tickets: 11530
+
+        Fixed additional issues in the event system triggered by unpickling of a
+        :class:`.Enum` datatype, continuing from :ticket:`11365` and
+        :ticket:`11360`,  where dynamically generated elements of the event
+        structure would not be present when unpickling in a new process.
+
+    .. change::
+        :tags: bug, engine
+        :tickets: 11532
+
+        Fixed issue in "insertmanyvalues" feature where a particular call to
+        ``cursor.fetchall()`` were not wrapped in SQLAlchemy's exception wrapper,
+        which apparently can raise a database exception during fetch when using
+        pyodbc.
+
+    .. change::
+        :tags: usecase, orm
+        :tickets: 11575
+
+        The :paramref:`_orm.aliased.name` parameter to :func:`_orm.aliased` may now
+        be combined with the :paramref:`_orm.aliased.flat` parameter, producing
+        per-table names based on a name-prefixed naming convention.  Pull request
+        courtesy Eric Atkin.
+
+    .. change::
+        :tags: bug, postgresql
+        :tickets: 11576
+
+        Fixed issue where the :func:`_sql.collate` construct, which explicitly sets
+        a collation for a given expression, would maintain collation settings for
+        the underlying type object from the expression, causing SQL expressions to
+        have both collations stated at once when used in further expressions for
+        specific dialects that render explicit type casts, such as that of asyncpg.
+        The :func:`_sql.collate` construct now assigns its own type to explicitly
+        include the new collation, assuming it's a string type.
+
+    .. change::
+        :tags: bug, sql
+        :tickets: 11592
+
+        Fixed bug where the :meth:`.Operators.nulls_first()` and
+        :meth:`.Operators.nulls_last()` modifiers would not be treated the same way
+        as :meth:`.Operators.desc()` and :meth:`.Operators.asc()` when determining
+        if an ORDER BY should be against a label name already in the statement. All
+        four modifiers are now treated the same within ORDER BY.
+
+    .. change::
+        :tags: bug, orm, regression
+        :tickets: 11625
+
+        Fixed regression appearing in 2.0.21 caused by :ticket:`10279` where using
+        a :func:`_sql.delete` or :func:`_sql.update` against an ORM class that is
+        the base of an inheritance hierarchy, while also specifying that subclasses
+        should be loaded polymorphically, would leak the polymorphic joins into the
+        UPDATE or DELETE statement as well creating incorrect SQL.
+
+    .. change::
+        :tags: bug, orm, regression
+        :tickets: 11661
+
+        Fixed regression from version 1.4 in
+        :meth:`_orm.Session.bulk_insert_mappings` where using the
+        :paramref:`_orm.Session.bulk_insert_mappings.return_defaults` parameter
+        would not populate the passed in dictionaries with newly generated primary
+        key values.
+
+
+    .. change::
+        :tags: bug, oracle, sqlite
+        :tickets: 11663
+
+        Implemented bitwise operators for Oracle which was previously
+        non-functional due to a non-standard syntax used by this database.
+        Oracle's support for bitwise "or" and "xor" starts with server version 21.
+        Additionally repaired the implementation of "xor" for SQLite.
+
+        As part of this change, the dialect compliance test suite has been enhanced
+        to include support for server-side bitwise tests; third party dialect
+        authors should refer to new "supports_bitwise" methods in the
+        requirements.py file to enable these tests.
+
+
+
+
+    .. change::
+        :tags: bug, typing
+
+        Fixed internal typing issues to establish compatibility with mypy 1.11.0.
+        Note that this does not include issues which have arisen with the
+        deprecated mypy plugin used by SQLAlchemy 1.4-style code; see the addiional
+        change note for this plugin indicating revised compatibility.
 
 .. changelog::
     :version: 2.0.31
diff --git a/doc/build/changelog/unreleased_20/10267.rst b/doc/build/changelog/unreleased_20/10267.rst
deleted file mode 100644 (file)
index cfbf04f..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-.. change::
-    :tags: bug, examples
-    :tickets: 10267
-
-    Fixed issue in history_meta example where the "version" column in the
-    versioned table needs to default to the most recent version number in the
-    history table on INSERT, to suit the use case of a table where rows are
-    deleted, and can then be replaced by new rows that re-use the same primary
-    key identity.  This fix adds an additonal SELECT query per INSERT in the
-    main table, which may be inefficient; for cases where primary keys are not
-    re-used, the default function may be omitted.  Patch courtesy  Philipp H.
-    v. Loewenfeld.
-
diff --git a/doc/build/changelog/unreleased_20/10820.rst b/doc/build/changelog/unreleased_20/10820.rst
deleted file mode 100644 (file)
index e2cc717..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-.. change::
-    :tags: oracle, usecase
-    :tickets: 10820
-
-    Added API support for server-side cursors for the oracledb async dialect,
-    allowing use of the :meth:`_asyncio.AsyncConnection.stream` and similar
-    stream methods.
diff --git a/doc/build/changelog/unreleased_20/10834.rst b/doc/build/changelog/unreleased_20/10834.rst
deleted file mode 100644 (file)
index 7670f57..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-.. change::
-    :tags: bug, orm
-    :tickets: 10834
-
-    Fixed issue where using the :meth:`_orm.Query.enable_eagerloads` and
-    :meth:`_orm.Query.yield_per` methods at the same time, in order to disable
-    eager loading that's configured on the mapper directly, would be silently
-    ignored, leading to errors or unexpected eager population of attributes.
diff --git a/doc/build/changelog/unreleased_20/11163.rst b/doc/build/changelog/unreleased_20/11163.rst
deleted file mode 100644 (file)
index da21b45..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-.. change::
-    :tags: orm
-    :tickets: 11163
-
-    Added a warning noting when an
-    :meth:`_engine.ConnectionEvents.engine_connect` event may be leaving
-    a transaction open, which can alter the behavior of a
-    :class:`_orm.Session` using such an engine as bind.
-    On SQLAlchemy 2.1 :paramref:`_orm.Session.join_transaction_mode` will
-    instead be ignored in all cases when the session bind is
-    an :class:`_engine.Engine`.
diff --git a/doc/build/changelog/unreleased_20/11435.rst b/doc/build/changelog/unreleased_20/11435.rst
deleted file mode 100644 (file)
index a3f96de..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-.. change::
-    :tags: bug, general, regression
-    :tickets: 11435
-
-    Restored legacy class names removed from
-    ``sqlalalchemy.orm.collections.*``, including
-    :class:`_orm.MappedCollection`, :func:`_orm.mapped_collection`,
-    :func:`_orm.column_mapped_collection`,
-    :func:`_orm.attribute_mapped_collection`. Pull request courtesy Takashi
-    Kajinami.
diff --git a/doc/build/changelog/unreleased_20/11471.rst b/doc/build/changelog/unreleased_20/11471.rst
deleted file mode 100644 (file)
index 4170de0..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-.. change::
-    :tags: bug, sql
-    :tickets: 11471
-
-    Follow up of :ticket:`11471` to fix caching issue where using the
-    :meth:`.CompoundSelectState.add_cte` method of the
-    :class:`.CompoundSelectState` construct would not set a correct cache key
-    which distinguished between different CTE expressions. Also added tests
-    that would detect issues similar to the one fixed in :ticket:`11544`.
diff --git a/doc/build/changelog/unreleased_20/11479.rst b/doc/build/changelog/unreleased_20/11479.rst
deleted file mode 100644 (file)
index fccaaf8..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-.. change::
-    :tags: bug, mysql
-    :tickets: 11479
-
-    Fixed issue in MySQL dialect where ENUM values that contained percent signs
-    were not properly escaped for the driver.
-
diff --git a/doc/build/changelog/unreleased_20/11480.rst b/doc/build/changelog/unreleased_20/11480.rst
deleted file mode 100644 (file)
index 7a653a6..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-.. change::
-    :tags: usecase, oracle
-    :tickets: 11480
-
-    Implemented two-phase transactions for the oracledb dialect. Historically,
-    this feature never worked with the cx_Oracle dialect, however recent
-    improvements to the oracledb successor now allow this to be possible.  The
-    two phase transaction API is available at the Core level via the
-    :meth:`_engine.Connection.begin_twophase` method.
diff --git a/doc/build/changelog/unreleased_20/11522.rst b/doc/build/changelog/unreleased_20/11522.rst
deleted file mode 100644 (file)
index 279197a..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-.. change::
-    :tags: bug, postgresql
-    :tickets: 11522
-
-    It is now considered a pool-invalidating disconnect event when psycopg2
-    throws an "SSL SYSCALL error: Success" error message, which can occur when
-    the SSL connection to Postgres is terminated abnormally.
\ No newline at end of file
diff --git a/doc/build/changelog/unreleased_20/11530.rst b/doc/build/changelog/unreleased_20/11530.rst
deleted file mode 100644 (file)
index 1ffa7c5..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-.. change::
-    :tags: bug, schema
-    :tickets: 11530
-
-    Fixed additional issues in the event system triggered by unpickling of a
-    :class:`.Enum` datatype, continuing from :ticket:`11365` and
-    :ticket:`11360`,  where dynamically generated elements of the event
-    structure would not be present when unpickling in a new process.
diff --git a/doc/build/changelog/unreleased_20/11532.rst b/doc/build/changelog/unreleased_20/11532.rst
deleted file mode 100644 (file)
index 141463d..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-.. change::
-    :tags: bug, engine
-    :tickets: 11532
-
-    Fixed issue in "insertmanyvalues" feature where a particular call to
-    ``cursor.fetchall()`` were not wrapped in SQLAlchemy's exception wrapper,
-    which apparently can raise a database exception during fetch when using
-    pyodbc.
diff --git a/doc/build/changelog/unreleased_20/11575.rst b/doc/build/changelog/unreleased_20/11575.rst
deleted file mode 100644 (file)
index 4eb5665..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-.. change::
-    :tags: usecase, orm
-    :tickets: 11575
-
-    The :paramref:`_orm.aliased.name` parameter to :func:`_orm.aliased` may now
-    be combined with the :paramref:`_orm.aliased.flat` parameter, producing
-    per-table names based on a name-prefixed naming convention.  Pull request
-    courtesy Eric Atkin.
diff --git a/doc/build/changelog/unreleased_20/11576.rst b/doc/build/changelog/unreleased_20/11576.rst
deleted file mode 100644 (file)
index 93cfe3b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-.. change::
-    :tags: bug, postgresql
-    :tickets: 11576
-
-    Fixed issue where the :func:`_sql.collate` construct, which explicitly sets
-    a collation for a given expression, would maintain collation settings for
-    the underlying type object from the expression, causing SQL expressions to
-    have both collations stated at once when used in further expressions for
-    specific dialects that render explicit type casts, such as that of asyncpg.
-    The :func:`_sql.collate` construct now assigns its own type to explicitly
-    include the new collation, assuming it's a string type.
diff --git a/doc/build/changelog/unreleased_20/11592.rst b/doc/build/changelog/unreleased_20/11592.rst
deleted file mode 100644 (file)
index 616eb1e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-.. change::
-    :tags: bug, sql
-    :tickets: 11592
-
-    Fixed bug where the :meth:`.Operators.nulls_first()` and
-    :meth:`.Operators.nulls_last()` modifiers would not be treated the same way
-    as :meth:`.Operators.desc()` and :meth:`.Operators.asc()` when determining
-    if an ORDER BY should be against a label name already in the statement. All
-    four modifiers are now treated the same within ORDER BY.
diff --git a/doc/build/changelog/unreleased_20/11625.rst b/doc/build/changelog/unreleased_20/11625.rst
deleted file mode 100644 (file)
index c32a90a..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-.. change::
-    :tags: bug, orm, regression
-    :tickets: 11625
-
-    Fixed regression appearing in 2.0.21 caused by :ticket:`10279` where using
-    a :func:`_sql.delete` or :func:`_sql.update` against an ORM class that is
-    the base of an inheritance hierarchy, while also specifying that subclasses
-    should be loaded polymorphically, would leak the polymorphic joins into the
-    UPDATE or DELETE statement as well creating incorrect SQL.
diff --git a/doc/build/changelog/unreleased_20/11661.rst b/doc/build/changelog/unreleased_20/11661.rst
deleted file mode 100644 (file)
index 35985d8..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-.. change::
-    :tags: bug, orm, regression
-    :tickets: 11661
-
-    Fixed regression from version 1.4 in
-    :meth:`_orm.Session.bulk_insert_mappings` where using the
-    :paramref:`_orm.Session.bulk_insert_mappings.return_defaults` parameter
-    would not populate the passed in dictionaries with newly generated primary
-    key values.
-
diff --git a/doc/build/changelog/unreleased_20/11663.rst b/doc/build/changelog/unreleased_20/11663.rst
deleted file mode 100644 (file)
index 599cd74..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-.. change::
-    :tags: bug, oracle, sqlite
-    :tickets: 11663
-
-    Implemented bitwise operators for Oracle which was previously
-    non-functional due to a non-standard syntax used by this database.
-    Oracle's support for bitwise "or" and "xor" starts with server version 21.
-    Additionally repaired the implementation of "xor" for SQLite.
-
-    As part of this change, the dialect compliance test suite has been enhanced
-    to include support for server-side bitwise tests; third party dialect
-    authors should refer to new "supports_bitwise" methods in the
-    requirements.py file to enable these tests.
-
-
-
diff --git a/doc/build/changelog/unreleased_20/mypy1110.rst b/doc/build/changelog/unreleased_20/mypy1110.rst
deleted file mode 100644 (file)
index 7804da4..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-.. change::
-    :tags: bug, typing
-
-    Fixed internal typing issues to establish compatibility with mypy 1.11.0.
-    Note that this does not include issues which have arisen with the
-    deprecated mypy plugin used by SQLAlchemy 1.4-style code; see the addiional
-    change note for this plugin indicating revised compatibility.