From 5247a1962da56ca93703324ddf172f2e73d3ed7f Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 21 Jan 2026 12:59:27 -0500 Subject: [PATCH] - 2.0.46 --- doc/build/changelog/changelog_20.rst | 89 ++++++++++++++++++- doc/build/changelog/unreleased_20/13039.rst | 16 ---- doc/build/changelog/unreleased_20/13045.rst | 9 -- doc/build/changelog/unreleased_20/13059.rst | 14 --- doc/build/changelog/unreleased_20/13067.rst | 11 --- doc/build/changelog/unreleased_20/13073.rst | 7 -- doc/build/changelog/unreleased_20/13075.rst | 13 --- .../changelog/unreleased_20/pg_fk_reflect.rst | 10 --- doc/build/conf.py | 4 +- 9 files changed, 90 insertions(+), 83 deletions(-) delete mode 100644 doc/build/changelog/unreleased_20/13039.rst delete mode 100644 doc/build/changelog/unreleased_20/13045.rst delete mode 100644 doc/build/changelog/unreleased_20/13059.rst delete mode 100644 doc/build/changelog/unreleased_20/13067.rst delete mode 100644 doc/build/changelog/unreleased_20/13073.rst delete mode 100644 doc/build/changelog/unreleased_20/13075.rst delete mode 100644 doc/build/changelog/unreleased_20/pg_fk_reflect.rst diff --git a/doc/build/changelog/changelog_20.rst b/doc/build/changelog/changelog_20.rst index 4b1296d5f5..c8b7a8af0d 100644 --- a/doc/build/changelog/changelog_20.rst +++ b/doc/build/changelog/changelog_20.rst @@ -10,7 +10,94 @@ .. changelog:: :version: 2.0.46 - :include_notes_from: unreleased_20 + :released: January 21, 2026 + + .. change:: + :tags: bug, sqlite + :tickets: 13039 + + Fixed issue in the aiosqlite driver where SQLAlchemy's setting of + aiosqlite's worker thread to "daemon" stopped working because the aiosqlite + architecture moved the location of the worker thread in version 0.22.0. + This "daemon" flag is necessary so that a program is able to exit if the + SQLite connection itself was not explicitly closed, which is particularly + likely with SQLAlchemy as it maintains SQLite connections in a connection + pool. While it's perfectly fine to call :meth:`.AsyncEngine.dispose` + before program exit, this is not historically or technically necessary for + any driver of any known backend, since a primary feature of relational + databases is durability. The change also implements support for + "terminate" with aiosqlite when using version version 0.22.1 or greater, + which implements a sync ``.stop()`` method. + + .. change:: + :tags: usecase, mssql + :tickets: 13045 + + Added support for the ``IF EXISTS`` clause when dropping indexes on SQL + Server 2016 (13.x) and later versions. The :paramref:`.DropIndex.if_exists` + parameter is now honored by the SQL Server dialect, allowing conditional + index drops that will not raise an error if the index does not exist. + Pull request courtesy Edgar Ramírez Mondragón. + + .. change:: + :tags: bug, postgresql + :tickets: 13059 + + Fixed issue where PostgreSQL JSONB operators + :meth:`_postgresql.JSONB.Comparator.path_match` and + :meth:`_postgresql.JSONB.Comparator.path_exists` were applying incorrect + ``VARCHAR`` casts to the right-hand side operand when used with newer + PostgreSQL drivers such as psycopg. The operators now indicate the + right-hand type as ``JSONPATH``, which currently results in no casting + taking place, but is also compatible with explicit casts if the + implementation were require it at a later point. + + + + .. change:: + :tags: bug, postgresql + :tickets: 13067 + + Fixed regression in PostgreSQL dialect where JSONB subscription syntax + would generate incorrect SQL for :func:`.cast` expressions returning JSONB, + causing syntax errors. The dialect now properly wraps cast expressions in + parentheses when using the ``[]`` subscription syntax, generating + ``(CAST(...))[index]`` instead of ``CAST(...)[index]`` to comply with + PostgreSQL syntax requirements. This extends the fix from :ticket:`12778` + which addressed the same issue for function calls. + + .. change:: + :tags: bug, mariadb + :tickets: 13070 + + Fixed the SQL compilation for the mariadb sequence "NOCYCLE" keyword that + is to be emitted when the :paramref:`.Sequence.cycle` parameter is set to + False on a :class:`.Sequence`. Pull request courtesy Diego Dupin. + + .. change:: + :tags: bug, typing + :tickets: 13075 + + Fixed typing issues where ORM mapped classes and aliased entities could not + be used as keys in result row mappings or as join targets in select + statements. Patterns such as ``row._mapping[User]``, + ``row._mapping[aliased(User)]``, ``row._mapping[with_polymorphic(...)]`` + (rejected by both mypy and Pylance), and ``.join(aliased(User))`` + (rejected by Pylance) are documented and fully supported at runtime but + were previously rejected by type checkers. The type definitions for + :class:`._KeyType` and :class:`._FromClauseArgument` have been updated to + accept these ORM entity types. + + .. change:: + :tags: bug, postgresql + + Improved the foreign key reflection regular expression pattern used by the + PostgreSQL dialect to be more permissive in matching identifier characters, + allowing it to correctly handle unicode characters in table and column + names. This change improves compatibility with PostgreSQL variants such as + CockroachDB that may use different quoting patterns in combination with + unicode characters in their identifiers. Pull request courtesy Gord + Thompson. .. changelog:: :version: 2.0.45 diff --git a/doc/build/changelog/unreleased_20/13039.rst b/doc/build/changelog/unreleased_20/13039.rst deleted file mode 100644 index 296a8aaacd..0000000000 --- a/doc/build/changelog/unreleased_20/13039.rst +++ /dev/null @@ -1,16 +0,0 @@ -.. change:: - :tags: bug, sqlite - :tickets: 13039 - - Fixed issue in the aiosqlite driver where SQLAlchemy's setting of - aiosqlite's worker thread to "daemon" stopped working because the aiosqlite - architecture moved the location of the worker thread in version 0.22.0. - This "daemon" flag is necessary so that a program is able to exit if the - SQLite connection itself was not explicitly closed, which is particularly - likely with SQLAlchemy as it maintains SQLite connections in a connection - pool. While it's perfectly fine to call :meth:`.AsyncEngine.dispose` - before program exit, this is not historically or technically necessary for - any driver of any known backend, since a primary feature of relational - databases is durability. The change also implements support for - "terminate" with aiosqlite when using version version 0.22.1 or greater, - which implements a sync ``.stop()`` method. diff --git a/doc/build/changelog/unreleased_20/13045.rst b/doc/build/changelog/unreleased_20/13045.rst deleted file mode 100644 index 9ac8257451..0000000000 --- a/doc/build/changelog/unreleased_20/13045.rst +++ /dev/null @@ -1,9 +0,0 @@ -.. change:: - :tags: usecase, mssql - :tickets: 13045 - - Added support for the ``IF EXISTS`` clause when dropping indexes on SQL - Server 2016 (13.x) and later versions. The :paramref:`.DropIndex.if_exists` - parameter is now honored by the SQL Server dialect, allowing conditional - index drops that will not raise an error if the index does not exist. - Pull request courtesy Edgar Ramírez Mondragón. diff --git a/doc/build/changelog/unreleased_20/13059.rst b/doc/build/changelog/unreleased_20/13059.rst deleted file mode 100644 index caeca4a7c3..0000000000 --- a/doc/build/changelog/unreleased_20/13059.rst +++ /dev/null @@ -1,14 +0,0 @@ -.. change:: - :tags: bug, postgresql - :tickets: 13059 - - Fixed issue where PostgreSQL JSONB operators - :meth:`_postgresql.JSONB.Comparator.path_match` and - :meth:`_postgresql.JSONB.Comparator.path_exists` were applying incorrect - ``VARCHAR`` casts to the right-hand side operand when used with newer - PostgreSQL drivers such as psycopg. The operators now indicate the - right-hand type as ``JSONPATH``, which currently results in no casting - taking place, but is also compatible with explicit casts if the - implementation were require it at a later point. - - diff --git a/doc/build/changelog/unreleased_20/13067.rst b/doc/build/changelog/unreleased_20/13067.rst deleted file mode 100644 index 12bedfb367..0000000000 --- a/doc/build/changelog/unreleased_20/13067.rst +++ /dev/null @@ -1,11 +0,0 @@ -.. change:: - :tags: bug, postgresql - :tickets: 13067 - - Fixed regression in PostgreSQL dialect where JSONB subscription syntax - would generate incorrect SQL for :func:`.cast` expressions returning JSONB, - causing syntax errors. The dialect now properly wraps cast expressions in - parentheses when using the ``[]`` subscription syntax, generating - ``(CAST(...))[index]`` instead of ``CAST(...)[index]`` to comply with - PostgreSQL syntax requirements. This extends the fix from :ticket:`12778` - which addressed the same issue for function calls. diff --git a/doc/build/changelog/unreleased_20/13073.rst b/doc/build/changelog/unreleased_20/13073.rst deleted file mode 100644 index 2716b8154c..0000000000 --- a/doc/build/changelog/unreleased_20/13073.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. change:: - :tags: bug, mariadb - :tickets: 13070 - - Fixed the SQL compilation for the mariadb sequence "NOCYCLE" keyword that - is to be emitted when the :paramref:`.Sequence.cycle` parameter is set to - False on a :class:`.Sequence`. Pull request courtesy Diego Dupin. diff --git a/doc/build/changelog/unreleased_20/13075.rst b/doc/build/changelog/unreleased_20/13075.rst deleted file mode 100644 index 387dde4b39..0000000000 --- a/doc/build/changelog/unreleased_20/13075.rst +++ /dev/null @@ -1,13 +0,0 @@ -.. change:: - :tags: bug, typing - :tickets: 13075 - - Fixed typing issues where ORM mapped classes and aliased entities could not - be used as keys in result row mappings or as join targets in select - statements. Patterns such as ``row._mapping[User]``, - ``row._mapping[aliased(User)]``, ``row._mapping[with_polymorphic(...)]`` - (rejected by both mypy and Pylance), and ``.join(aliased(User))`` - (rejected by Pylance) are documented and fully supported at runtime but - were previously rejected by type checkers. The type definitions for - :class:`._KeyType` and :class:`._FromClauseArgument` have been updated to - accept these ORM entity types. diff --git a/doc/build/changelog/unreleased_20/pg_fk_reflect.rst b/doc/build/changelog/unreleased_20/pg_fk_reflect.rst deleted file mode 100644 index 02db2cc613..0000000000 --- a/doc/build/changelog/unreleased_20/pg_fk_reflect.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. change:: - :tags: bug, postgresql - - Improved the foreign key reflection regular expression pattern used by the - PostgreSQL dialect to be more permissive in matching identifier characters, - allowing it to correctly handle unicode characters in table and column - names. This change improves compatibility with PostgreSQL variants such as - CockroachDB that may use different quoting patterns in combination with - unicode characters in their identifiers. Pull request courtesy Gord - Thompson. diff --git a/doc/build/conf.py b/doc/build/conf.py index cf70a0dc49..cf5af6ed5d 100644 --- a/doc/build/conf.py +++ b/doc/build/conf.py @@ -239,9 +239,9 @@ copyright = "2007-2026, 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.45" +release = "2.0.46" -release_date = "December 9, 2025" +release_date = "January 21, 2026" site_base = os.environ.get("RTD_SITE_BASE", "https://www.sqlalchemy.org") site_adapter_template = "docs_adapter.mako" -- 2.47.3