Skip to content

Commit 9ce5d1e

Browse files
committed
- 2.0.47
1 parent 92985c0 commit 9ce5d1e

9 files changed

Lines changed: 118 additions & 111 deletions

File tree

doc/build/changelog/changelog_20.rst

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

1111
.. changelog::
1212
:version: 2.0.47
13-
:include_notes_from: unreleased_20
13+
:released: February 24, 2026
14+
15+
.. change::
16+
:tags: bug, orm
17+
:tickets: 13104
18+
19+
Fixed issue when using ORM mappings with Python 3.14's :pep:`649` feature
20+
that no longer requires "future annotations", where the ORM's introspection
21+
of the ``__init__`` method of mapped classes would fail if non-present
22+
identifiers in annotations were present. The vendored ``getfullargspec()``
23+
method has been amended to use ``Format.FORWARDREF`` under Python 3.14 to
24+
prevent resolution of names that aren't present.
25+
26+
27+
.. change::
28+
:tags: bug, postgresql
29+
:tickets: 13105
30+
31+
Fixed an issue in the PostgreSQL dialect where foreign key constraint
32+
reflection would incorrectly swap or fail to capture ``onupdate`` and
33+
``ondelete`` values when these clauses appeared in a different order than
34+
expected in the constraint definition. This issue primarily affected
35+
PostgreSQL-compatible databases such as CockroachDB, which may return ``ON
36+
DELETE`` before ``ON UPDATE`` in the constraint definition string. The
37+
reflection logic now correctly parses both clauses regardless of their
38+
ordering.
39+
40+
.. change::
41+
:tags: bug, postgresql
42+
:tickets: 13107
43+
44+
Fixed issue in the :ref:`engine_insertmanyvalues` feature where using
45+
PostgreSQL's ``ON CONFLICT`` clause with
46+
:paramref:`_dml.Insert.returning.sort_by_parameter_order` enabled would
47+
generate invalid SQL when the insert used an implicit sentinel (server-side
48+
autoincrement primary key). The generated SQL would incorrectly declare a
49+
sentinel counter column in the ``imp_sen`` table alias without providing
50+
corresponding values in the ``VALUES`` clause, leading to a
51+
``ProgrammingError`` indicating column count mismatch. The fix allows batch
52+
execution mode when ``embed_values_counter`` is active, as the embedded
53+
counter provides the ordering capability needed even with upsert behaviors,
54+
rather than unnecessarily downgrading to row-at-a-time execution.
55+
56+
.. change::
57+
:tags: bug, postgresql
58+
:tickets: 13110
59+
60+
Fixed issue where :meth:`_postgresql.Insert.on_conflict_do_update`
61+
parameters were not respecting compilation options such as
62+
``literal_binds=True``. Pull request courtesy Loïc Simon.
63+
64+
65+
.. change::
66+
:tags: bug, sqlite
67+
:tickets: 13110
68+
69+
Fixed issue where :meth:`_sqlite.Insert.on_conflict_do_update`
70+
parameters were not respecting compilation options such as
71+
``literal_binds=True``. Pull request courtesy Loïc Simon.
72+
73+
.. change::
74+
:tags: usecase, engine
75+
:tickets: 13116
76+
77+
The connection object returned by :meth:`_engine.Engine.raw_connection`
78+
now supports the context manager protocol, automatically returning the
79+
connection to the pool when exiting the context.
80+
81+
.. change::
82+
:tags: bug, postgresql
83+
:tickets: 13130
84+
85+
Fixed issue where :meth:`_postgresql.Insert.on_conflict_do_update`
86+
using parametrized bound parameters in the ``set_`` clause would fail
87+
when used with executemany batching. For dialects that use the
88+
``use_insertmanyvalues_wo_returning`` optimization (psycopg2),
89+
insertmanyvalues is now disabled when there is an ON CONFLICT clause.
90+
For cases with RETURNING, row-at-a-time mode is used when the SET
91+
clause contains parametrized bindparams (bindparams that receive
92+
values from the parameters dict), ensuring each row's parameters are
93+
correctly applied. ON CONFLICT statements using expressions like
94+
``excluded.<column>`` continue to batch normally.
95+
96+
97+
.. change::
98+
:tags: bug, sqlite
99+
:tickets: 13130
100+
101+
Fixed issue where :meth:`_sqlite.Insert.on_conflict_do_update`
102+
using parametrized bound parameters in the ``set_`` clause would fail
103+
when used with executemany batching. Row-at-a-time mode is now used
104+
for ON CONFLICT statements with RETURNING that contain parametrized
105+
bindparams, ensuring each row's parameters are correctly applied. ON
106+
CONFLICT statements using expressions like ``excluded.<column>``
107+
continue to batch normally.
108+
109+
.. change::
110+
:tags: bug, mysql
111+
:tickets: 13134
112+
113+
Fixed issue where DDL compilation options were registered to the hard-coded
114+
dialect name ``mysql``. This made it awkward for MySQL-derived dialects
115+
like MariaDB, StarRocks, etc. to work with such options when different sets
116+
of options exist for different platforms. Options are now registered under
117+
the actual dialect name, and a fallback was added to help avoid errors when
118+
an option does not exist for that dialect.
119+
120+
To maintain backwards compatibility, when using the MariaDB dialect with
121+
the options ``mysql_with_parser`` or ``mysql_using`` without also specifying
122+
the corresponding ``mariadb_`` prefixed options, a deprecation warning will
123+
be emitted. The ``mysql_`` prefixed options will continue to work during
124+
the deprecation period. Users should update their code to additionally
125+
specify ``mariadb_with_parser`` and ``mariadb_using`` when using the
126+
``mariadb://`` dialect, or specify both options to support both dialects.
127+
128+
Pull request courtesy Tiansu Yu.
14129

15130
.. changelog::
16131
:version: 2.0.46

doc/build/changelog/unreleased_20/13104.rst

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

doc/build/changelog/unreleased_20/13105.rst

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

doc/build/changelog/unreleased_20/13107.rst

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

doc/build/changelog/unreleased_20/13110.rst

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

doc/build/changelog/unreleased_20/13116.rst

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

doc/build/changelog/unreleased_20/13130.rst

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

doc/build/changelog/unreleased_20/13134.rst

Lines changed: 0 additions & 20 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.46"
242+
release = "2.0.47"
243243

244-
release_date = "January 21, 2026"
244+
release_date = "February 24, 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)