Skip to content

Commit 5247a19

Browse files
committed
- 2.0.46
1 parent 0c81b8f commit 5247a19

9 files changed

Lines changed: 90 additions & 83 deletions

File tree

doc/build/changelog/changelog_20.rst

Lines changed: 88 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,94 @@
1010

1111
.. changelog::
1212
:version: 2.0.46
13-
:include_notes_from: unreleased_20
13+
:released: January 21, 2026
14+
15+
.. change::
16+
:tags: bug, sqlite
17+
:tickets: 13039
18+
19+
Fixed issue in the aiosqlite driver where SQLAlchemy's setting of
20+
aiosqlite's worker thread to "daemon" stopped working because the aiosqlite
21+
architecture moved the location of the worker thread in version 0.22.0.
22+
This "daemon" flag is necessary so that a program is able to exit if the
23+
SQLite connection itself was not explicitly closed, which is particularly
24+
likely with SQLAlchemy as it maintains SQLite connections in a connection
25+
pool. While it's perfectly fine to call :meth:`.AsyncEngine.dispose`
26+
before program exit, this is not historically or technically necessary for
27+
any driver of any known backend, since a primary feature of relational
28+
databases is durability. The change also implements support for
29+
"terminate" with aiosqlite when using version version 0.22.1 or greater,
30+
which implements a sync ``.stop()`` method.
31+
32+
.. change::
33+
:tags: usecase, mssql
34+
:tickets: 13045
35+
36+
Added support for the ``IF EXISTS`` clause when dropping indexes on SQL
37+
Server 2016 (13.x) and later versions. The :paramref:`.DropIndex.if_exists`
38+
parameter is now honored by the SQL Server dialect, allowing conditional
39+
index drops that will not raise an error if the index does not exist.
40+
Pull request courtesy Edgar Ramírez Mondragón.
41+
42+
.. change::
43+
:tags: bug, postgresql
44+
:tickets: 13059
45+
46+
Fixed issue where PostgreSQL JSONB operators
47+
:meth:`_postgresql.JSONB.Comparator.path_match` and
48+
:meth:`_postgresql.JSONB.Comparator.path_exists` were applying incorrect
49+
``VARCHAR`` casts to the right-hand side operand when used with newer
50+
PostgreSQL drivers such as psycopg. The operators now indicate the
51+
right-hand type as ``JSONPATH``, which currently results in no casting
52+
taking place, but is also compatible with explicit casts if the
53+
implementation were require it at a later point.
54+
55+
56+
57+
.. change::
58+
:tags: bug, postgresql
59+
:tickets: 13067
60+
61+
Fixed regression in PostgreSQL dialect where JSONB subscription syntax
62+
would generate incorrect SQL for :func:`.cast` expressions returning JSONB,
63+
causing syntax errors. The dialect now properly wraps cast expressions in
64+
parentheses when using the ``[]`` subscription syntax, generating
65+
``(CAST(...))[index]`` instead of ``CAST(...)[index]`` to comply with
66+
PostgreSQL syntax requirements. This extends the fix from :ticket:`12778`
67+
which addressed the same issue for function calls.
68+
69+
.. change::
70+
:tags: bug, mariadb
71+
:tickets: 13070
72+
73+
Fixed the SQL compilation for the mariadb sequence "NOCYCLE" keyword that
74+
is to be emitted when the :paramref:`.Sequence.cycle` parameter is set to
75+
False on a :class:`.Sequence`. Pull request courtesy Diego Dupin.
76+
77+
.. change::
78+
:tags: bug, typing
79+
:tickets: 13075
80+
81+
Fixed typing issues where ORM mapped classes and aliased entities could not
82+
be used as keys in result row mappings or as join targets in select
83+
statements. Patterns such as ``row._mapping[User]``,
84+
``row._mapping[aliased(User)]``, ``row._mapping[with_polymorphic(...)]``
85+
(rejected by both mypy and Pylance), and ``.join(aliased(User))``
86+
(rejected by Pylance) are documented and fully supported at runtime but
87+
were previously rejected by type checkers. The type definitions for
88+
:class:`._KeyType` and :class:`._FromClauseArgument` have been updated to
89+
accept these ORM entity types.
90+
91+
.. change::
92+
:tags: bug, postgresql
93+
94+
Improved the foreign key reflection regular expression pattern used by the
95+
PostgreSQL dialect to be more permissive in matching identifier characters,
96+
allowing it to correctly handle unicode characters in table and column
97+
names. This change improves compatibility with PostgreSQL variants such as
98+
CockroachDB that may use different quoting patterns in combination with
99+
unicode characters in their identifiers. Pull request courtesy Gord
100+
Thompson.
14101

15102
.. changelog::
16103
:version: 2.0.45

doc/build/changelog/unreleased_20/13039.rst

Lines changed: 0 additions & 16 deletions
This file was deleted.

doc/build/changelog/unreleased_20/13045.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

doc/build/changelog/unreleased_20/13059.rst

Lines changed: 0 additions & 14 deletions
This file was deleted.

doc/build/changelog/unreleased_20/13067.rst

Lines changed: 0 additions & 11 deletions
This file was deleted.

doc/build/changelog/unreleased_20/13073.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

doc/build/changelog/unreleased_20/13075.rst

Lines changed: 0 additions & 13 deletions
This file was deleted.

doc/build/changelog/unreleased_20/pg_fk_reflect.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.

doc/build/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,9 @@
239239
# The short X.Y version.
240240
version = "2.0"
241241
# The full version, including alpha/beta/rc tags.
242-
release = "2.0.45"
242+
release = "2.0.46"
243243

244-
release_date = "December 9, 2025"
244+
release_date = "January 21, 2026"
245245

246246
site_base = os.environ.get("RTD_SITE_BASE", "https://www.sqlalchemy.org")
247247
site_adapter_template = "docs_adapter.mako"

0 commit comments

Comments
 (0)