Skip to content

Commit 6fa2689

Browse files
committed
- 2.0.37
1 parent f3c5a1f commit 6fa2689

20 files changed

Lines changed: 183 additions & 165 deletions

doc/build/changelog/changelog_20.rst

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

1111
.. changelog::
1212
:version: 2.0.37
13-
:include_notes_from: unreleased_20
13+
:released: January 9, 2025
14+
15+
.. change::
16+
:tags: usecase, mariadb
17+
:tickets: 10720
18+
19+
Added sql types ``INET4`` and ``INET6`` in the MariaDB dialect. Pull
20+
request courtesy Adam Žurek.
21+
22+
.. change::
23+
:tags: bug, orm
24+
:tickets: 11370
25+
26+
Fixed issue regarding ``Union`` types that would be present in the
27+
:paramref:`_orm.registry.type_annotation_map` of a :class:`_orm.registry`
28+
or declarative base class, where a :class:`.Mapped` element that included
29+
one of the subtypes present in that ``Union`` would be matched to that
30+
entry, potentially ignoring other entries that matched exactly. The
31+
correct behavior now takes place such that an entry should only match in
32+
:paramref:`_orm.registry.type_annotation_map` exactly, as a ``Union`` type
33+
is a self-contained type. For example, an attribute with ``Mapped[float]``
34+
would previously match to a :paramref:`_orm.registry.type_annotation_map`
35+
entry ``Union[float, Decimal]``; this will no longer match and will now
36+
only match to an entry that states ``float``. Pull request courtesy Frazer
37+
McLean.
38+
39+
.. change::
40+
:tags: bug, postgresql
41+
:tickets: 11724
42+
43+
Fixes issue in :meth:`.Dialect.get_multi_indexes` in the PostgreSQL
44+
dialect, where an error would be thrown when attempting to use alembic with
45+
a vector index from the pgvecto.rs extension.
46+
47+
.. change::
48+
:tags: usecase, mysql, mariadb
49+
:tickets: 11764
50+
51+
Added support for the ``LIMIT`` clause with ``DELETE`` for the MySQL and
52+
MariaDB dialects, to complement the already present option for
53+
``UPDATE``. The :meth:`.Delete.with_dialect_options` method of the
54+
:func:`.delete` construct accepts parameters for ``mysql_limit`` and
55+
``mariadb_limit``, allowing users to specify a limit on the number of rows
56+
deleted. Pull request courtesy of Pablo Nicolás Estevez.
57+
58+
59+
.. change::
60+
:tags: bug, mysql, mariadb
61+
62+
Added logic to ensure that the ``mysql_limit`` and ``mariadb_limit``
63+
parameters of :meth:`.Update.with_dialect_options` and
64+
:meth:`.Delete.with_dialect_options` when compiled to string will only
65+
compile if the parameter is passed as an integer; a ``ValueError`` is
66+
raised otherwise.
67+
68+
.. change::
69+
:tags: bug, orm
70+
:tickets: 11944
71+
72+
Fixed bug in how type unions were handled within
73+
:paramref:`_orm.registry.type_annotation_map` as well as
74+
:class:`._orm.Mapped` that made the lookup behavior of ``a | b`` different
75+
from that of ``Union[a, b]``.
76+
77+
.. change::
78+
:tags: bug, orm
79+
:tickets: 11955
80+
81+
Consistently handle ``TypeAliasType`` (defined in PEP 695) obtained with
82+
the ``type X = int`` syntax introduced in python 3.12. Now in all cases one
83+
such alias must be explicitly added to the type map for it to be usable
84+
inside :class:`.Mapped`. This change also revises the approach added in
85+
:ticket:`11305`, now requiring the ``TypeAliasType`` to be added to the
86+
type map. Documentation on how unions and type alias types are handled by
87+
SQLAlchemy has been added in the
88+
:ref:`orm_declarative_mapped_column_type_map` section of the documentation.
89+
90+
.. change::
91+
:tags: feature, oracle
92+
:tickets: 12016
93+
94+
Added new table option ``oracle_tablespace`` to specify the ``TABLESPACE``
95+
option when creating a table in Oracle. This allows users to define the
96+
tablespace in which the table should be created. Pull request courtesy of
97+
Miguel Grillo.
98+
99+
.. change::
100+
:tags: orm, bug
101+
:tickets: 12019
102+
103+
Fixed regression caused by an internal code change in response to recent
104+
Mypy releases that caused the very unusual case of a list of ORM-mapped
105+
attribute expressions passed to :meth:`.ColumnOperators.in_` to no longer
106+
be accepted.
107+
108+
.. change::
109+
:tags: oracle, usecase
110+
:tickets: 12032
111+
112+
Use the connection attribute ``max_identifier_length`` available
113+
in oracledb since version 2.5 when determining the identifier length
114+
in the Oracle dialect.
115+
116+
.. change::
117+
:tags: bug, sql
118+
:tickets: 12084
119+
120+
Fixed issue in "lambda SQL" feature where the tracking of bound parameters
121+
could be corrupted if the same lambda were evaluated across multiple
122+
compile phases, including when using the same lambda across multiple engine
123+
instances or with statement caching disabled.
124+
125+
126+
.. change::
127+
:tags: usecase, postgresql
128+
:tickets: 12093
129+
130+
The :class:`_postgresql.Range` type now supports
131+
:meth:`_postgresql.Range.__contains__`. Pull request courtesy of Frazer
132+
McLean.
133+
134+
.. change::
135+
:tags: bug, oracle
136+
:tickets: 12100
137+
138+
Fixed compilation of ``TABLE`` function when used in a ``FROM`` clause in
139+
Oracle Database dialect.
140+
141+
.. change::
142+
:tags: bug, oracle
143+
:tickets: 12150
144+
145+
Fixed issue in oracledb / cx_oracle dialects where output type handlers for
146+
``CLOB`` were being routed to ``NVARCHAR`` rather than ``VARCHAR``, causing
147+
a double conversion to take place.
148+
149+
150+
.. change::
151+
:tags: bug, postgresql
152+
:tickets: 12170
153+
154+
Fixed issue where creating a table with a primary column of
155+
:class:`_sql.SmallInteger` and using the asyncpg driver would result in
156+
the type being compiled to ``SERIAL`` rather than ``SMALLSERIAL``.
157+
158+
.. change::
159+
:tags: bug, orm
160+
:tickets: 12207
161+
162+
Fixed issues in type handling within the
163+
:paramref:`_orm.registry.type_annotation_map` feature which prevented the
164+
use of unions, using either pep-604 or ``Union`` syntaxes under future
165+
annotations mode, which contained multiple generic types as elements from
166+
being correctly resolvable.
167+
168+
.. change::
169+
:tags: bug, orm
170+
:tickets: 12216
171+
172+
Fixed issue in event system which prevented an event listener from being
173+
attached and detached from multiple class-like objects, namely the
174+
:class:`.sessionmaker` or :class:`.scoped_session` targets that assign to
175+
:class:`.Session` subclasses.
176+
177+
178+
.. change::
179+
:tags: bug, postgresql
180+
:tickets: 12220
181+
182+
Adjusted the asyncpg dialect so that an empty SQL string, which is valid
183+
for PostgreSQL server, may be successfully processed at the dialect level,
184+
such as when using :meth:`.Connection.exec_driver_sql`. Pull request
185+
courtesy Andrew Jackson.
186+
187+
188+
.. change::
189+
:tags: usecase, sqlite
190+
:tickets: 7398
191+
192+
Added SQLite table option to enable ``STRICT`` tables. Pull request
193+
courtesy of Guilherme Crocetti.
14194

15195
.. changelog::
16196
:version: 2.0.36

doc/build/changelog/unreleased_20/10720.rst

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

doc/build/changelog/unreleased_20/11370.rst

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

doc/build/changelog/unreleased_20/11724.rst

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

doc/build/changelog/unreleased_20/11764.rst

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

doc/build/changelog/unreleased_20/11944.rst

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

doc/build/changelog/unreleased_20/11955.rst

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

doc/build/changelog/unreleased_20/12016.rst

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

doc/build/changelog/unreleased_20/12019.rst

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

doc/build/changelog/unreleased_20/12032.rst

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

0 commit comments

Comments
 (0)