8000 - 2.0.40 · sqlalchemy/sqlalchemy@b4d7376 · GitHub
[go: up one dir, main page]

Skip to content

Commit b4d7376

Browse files
committed
- 2.0.40
1 parent 7163b9d commit b4d7376

File tree

12 files changed

+118
-108
lines changed

12 files changed

+118
-108
lines changed

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.40
13-
:include_notes_from: unreleased_20
13+
:released: March 27, 2025
14+
15+
.. change::
16+
:tags: usecase, postgresql
17+
:tickets: 11595
18+
19+
Added support for specifying a list of columns for ``SET NULL`` and ``SET
20+
DEFAULT`` actions of ``ON DELETE`` clause of foreign key definition on
21+
PostgreSQL. Pull request courtesy Denis Laxalde.
22+
23+
.. seealso::
24+
25+
:ref:`postgresql_constraint_options`
26+
27+
.. change::
28+
:tags: bug, orm
29+
:tickets: 12329
30+
31+
Fixed regression which occurred as of 2.0.37 where the checked
32+
:class:`.ArgumentError` that's raised when an inappropriate type or object
33+
is used inside of a :class:`.Mapped` annotation would raise ``TypeError``
34+
with "boolean value of this clause is not defined" if the object resolved
35+
into a SQL expression in a boolean context, for programs where future
36+
annotations mode was not enabled. This case is now handled explicitly and
37+
a new error message has also been tailored for this case. In addition, as
38+
there are at least half a dozen distinct error scenarios for intepretation
39+
of the :class:`.Mapped` construct, these scenarios have all been unified
40+
under a new subclass of :class:`.ArgumentError` called
41+
:class:`.MappedAnnotationError`, to provide some continuity between these
42+
different scenarios, even though specific messaging remains distinct.
43+
44+
.. change::
45+
:tags: bug, mysql
46+
:tickets: 12332
47+
48+
Support has been re-added for the MySQL-Connector/Python DBAPI using the
49+
``mysql+mysqlconnector://`` URL scheme. The DBAPI now works against
50+
modern MySQL versions as well as MariaDB versions (in the latter case it's
51+
required to pass charset/collation explicitly). Note however that
52+
server side cursor support is disabled due to unresolved issues with this
53+
driver.
54+
55+
.. change::
56+
:tags: bug, sql
57+
:tickets: 12363
58+
59+
Fixed issue in :class:`.CTE` constructs involving multiple DDL
60+
:class:`_sql.Insert` statements with multiple VALUES parameter sets where the
61+
bound parameter names generated for these parameter sets would conflict,
62+
generating a compile time error.
63+
64+
65+
.. change::
66+
:tags: bug, sqlite
67+
:tickets: 12425
68+
69+
Expanded the rules for when to apply parenthesis to a server default in DDL
70+
to suit the general case of a default string that contains non-word
71+
characters such as spaces or operators and is not a string literal.
72+
73+
.. change::
74+
:tags: bug, mysql
75+
:tickets: 12425
76+
77+
Fixed issue in MySQL server default reflection where a default that has
78+
spaces would not be correctly reflected. Additionally, expanded the rules
79+
for when to apply parenthesis to a server default in DDL to suit the
80+
general case of a default string that contains non-word characters such as
81+
spaces or operators and is not a string literal.
82+
83+
84+
.. change::
85+
:tags: usecase, postgresql
86+
:tickets: 12432
87+
88+
When building a PostgreSQL ``ARRAY`` literal using
89+
:class:`_postgresql.array` with an empty ``clauses`` argument, the
90+
:paramref:`_postgresql.array.type_` parameter is now significant in that it
91+
will be used to render the resulting ``ARRAY[]`` SQL expression with a
92+
cast, such as ``ARRAY[]::INTEGER``. Pull request courtesy Denis Laxalde.
93+
94+
.. change::
95+
:tags: sql, usecase
96+
:tickets: 12450
97+
98+
Implemented support for the GROUPS frame specification in window functions
99+
by adding :paramref:`_sql.over.groups` option to :func:`_sql.over`
100+
and :meth:`.FunctionElement.over`. Pull request courtesy Kaan Dikmen.
101+
102+
.. change::
103+
:tags: bug, sql
104+
:tickets: 12451
105+
106+
Fixed regression caused by :ticket:`7471` leading to a SQL compilation
107+
issue where name disambiguation for two same-named FROM clauses with table
108+
aliasing in use at the same time would produce invalid SQL in the FROM
109+
clause with two "AS" clauses for the aliased table, due to double aliasing.
110+
111+
.. change::
112+
:tags: bug, asyncio
113+
:tickets: 12471
114+
115+
Fixed issue where :meth:`.AsyncSession.get_transaction` and
116+
:meth:`.AsyncSession.get_nested_transaction` would fail with
117+
``NotImplementedError`` if the "proxy transaction" used by
118+
:class:`.AsyncSession` were garbage collected and needed regeneration.
119+
120+
.. change::
121+
:tags: bug, orm
122+
:tickets: 12473
123+
124+
Fixed regression in ORM Annotated Declarative class interpretation caused
125+
by ``typing_extension==4.13.0`` that introduced a different implementation
126+
for ``TypeAliasType`` while SQLAlchemy assumed that it would be equivalent
127+
to the ``typing`` version, leading to pep-695 type annotations not
128+
resolving to SQL types as expected.
14129

15130
.. changelog::
16131
:version: 2.0.39

doc/build/changelog/unreleased_20/11595.rst

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

doc/build/changelog/unreleased_20/12329.rst

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

doc/build/changelog/unreleased_20/12332.rst

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

doc/build/changelog/unreleased_20/12363.rst

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

doc/build/changelog/unreleased_20/12425.rst

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

doc/build/changelog/unreleased_20/12432.rst

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

doc/build/changelog/unreleased_20/12450.rst

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

doc/build/changelog/unreleased_20/12451.rst

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

doc/build/changelog/unreleased_20/12471.rst

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

0 commit comments

Comments
 (0)
0